diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-06 21:38:43 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-07 16:44:54 -0700 |
commit | 4b80488e3bd9cfeba8791eaf84086e36d60d2608 (patch) | |
tree | e9a5464efa4d2de864fe9bb529cdd33c9b75287b /meta-networking | |
parent | 5b73deaf184f1bd4b78158552c144042a11d1d20 (diff) | |
download | meta-openembedded-4b80488e3bd9cfeba8791eaf84086e36d60d2608.tar.gz |
ntp: Fix check for pthread_detach
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/ntp/ntp/0001-sntp-Fix-types-in-check-for-pthread_detach.patch | 33 | ||||
-rw-r--r-- | meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp/0001-sntp-Fix-types-in-check-for-pthread_detach.patch b/meta-networking/recipes-support/ntp/ntp/0001-sntp-Fix-types-in-check-for-pthread_detach.patch new file mode 100644 index 000000000..ca15470ac --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/0001-sntp-Fix-types-in-check-for-pthread_detach.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 864f43ae09d18b1114d5c894e836698743e4e44c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 6 Sep 2022 21:36:35 -0700 | ||
4 | Subject: [PATCH] sntp: Fix types in check for pthread_detach | ||
5 | |||
6 | New compilers are stricter and flag assigning NULL to pthread_t as error | ||
7 | therefore using a pthread_t variable constructed from -1 | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | sntp/m4/openldap-thread-check.m4 | 5 +---- | ||
13 | 1 file changed, 1 insertion(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/sntp/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4 | ||
16 | index 7768a5c..b9e54ad 100644 | ||
17 | --- a/sntp/m4/openldap-thread-check.m4 | ||
18 | +++ b/sntp/m4/openldap-thread-check.m4 | ||
19 | @@ -262,10 +262,7 @@ pthread_rwlock_t rwlock; | ||
20 | dnl save the flags | ||
21 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
22 | #include <pthread.h> | ||
23 | -#ifndef NULL | ||
24 | -#define NULL (void*)0 | ||
25 | -#endif | ||
26 | -]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) | ||
27 | +]], [[pthread_detach((pthread_t)-1);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) | ||
28 | ]) | ||
29 | |||
30 | if test $ol_cv_func_pthread_detach = no ; then | ||
31 | -- | ||
32 | 2.37.3 | ||
33 | |||
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb index a30f720bb..50f5477f2 100644 --- a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb +++ b/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb | |||
@@ -15,6 +15,7 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g | |||
15 | file://reproducibility-fixed-path-to-posix-shell.patch \ | 15 | file://reproducibility-fixed-path-to-posix-shell.patch \ |
16 | file://0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch \ | 16 | file://0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch \ |
17 | file://0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch \ | 17 | file://0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch \ |
18 | file://0001-sntp-Fix-types-in-check-for-pthread_detach.patch \ | ||
18 | file://ntpd \ | 19 | file://ntpd \ |
19 | file://ntp.conf \ | 20 | file://ntp.conf \ |
20 | file://ntpdate \ | 21 | file://ntpdate \ |