Skip to content
Snippets Groups Projects
Commit ccee4b33 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Fix build with glibc 2.34 (patch from Gentoo)

parent 4c7b3bbf
No related branches found
No related tags found
No related merge requests found
......@@ -14,17 +14,24 @@ arch=('x86_64')
depends=('openssl' 'perl' 'libcap' 'libedit')
backup=('etc/ntp.conf')
source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz"
'ntp-4.2.8_p15-glibc-2.34.patch'
'ntp.conf'
'ntpd.service'
'ntpdate.service'
'ntp.sysusers')
sha1sums=('e34e5b6f48c3ed1bbcfb03080dec1b8f91e19381'
'1423b8ef72a3806ed74affc1973f66ed7cfa2afb'
'ad1d6ee2e9aca64a84a7224c88bf6008ac6c69e1'
'0cccca872385e0142888ab48d273fec0669b30a8'
'059b382d1af0c55202e2d17f2ae065a2cbfec9ee'
'e8d1c895eabeb45b1a5f096fa5fc3c088eb3ee71')
options=('!emptydirs')
prepare() {
cd "${srcdir}/${_pkgname}-${_pkgver}"
patch -Np1 -i ../ntp-4.2.8_p15-glibc-2.34.patch
}
build() {
cd "${srcdir}/${_pkgname}-${_pkgver}"
......
https://bugs.gentoo.org/806358
https://patchwork.openembedded.org/patch/180019/
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 31 Jul 2021 10:51:41 -0700
Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc
In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which
could mean different stack sizes at runtime on different architectures
and it also causes compile failure. Default glibc thread stack size
or 64Kb set by ntp should be good in glibc these days.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/libntp/work_thread.c
+++ b/libntp/work_thread.c
@@ -41,7 +41,7 @@
#ifndef THREAD_MINSTACKSIZE
# define THREAD_MINSTACKSIZE (64U * 1024)
#endif
-#ifndef __sun
+#if !defined(__sun) && !defined(__GLIBC__)
#if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
# undef THREAD_MINSTACKSIZE
# define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
--
2.32.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment