Skip to content

Commit bf0cb46

Browse files
authored
Merge pull request #146 from sixtyfourktec/master
net::ntp: fix build with newer gcc/clang versions
2 parents f1fadac + 0d4d8fe commit bf0cb46

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

recipes/net/ntp.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
inherit: [autotools]
1+
inherit: [autoconf, autotools, patch]
22

33
metaEnvironment:
44
PKG_VERSION: "4.2.8p18"
@@ -19,8 +19,18 @@ checkoutSCM:
1919
digestSHA1: 9b5247a8576c6082900682c6de98c8d3c17fc15f
2020
stripComponents: 1
2121

22+
checkoutDeterministic: True
23+
checkoutScript: |
24+
patchApplySeries $<@ntp/*.patch@>
25+
2226
buildScript: |
23-
autotoolsBuild $1 \
27+
SRC=$(pwd)/src
28+
autoconfSync $1 $SRC
29+
pushd $SRC
30+
autoconfReconfigure -u
31+
popd
32+
33+
autotoolsBuild $SRC \
2434
--with-shared \
2535
--program-transform-name=s,,, \
2636
--disable-tickadj \
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff -ru a/sntp/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4
2+
--- a/sntp/m4/openldap-thread-check.m4 2023-05-31 12:31:39.000000000 +0200
3+
+++ b/sntp/m4/openldap-thread-check.m4 2026-02-25 23:18:38.319727258 +0100
4+
@@ -262,10 +262,8 @@
5+
dnl save the flags
6+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
7+
#include <pthread.h>
8+
-#ifndef NULL
9+
-#define NULL (void*)0
10+
-#endif
11+
-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
12+
+pthread_t thread;
13+
+]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
14+
])
15+
16+
if test $ol_cv_func_pthread_detach = no ; then

0 commit comments

Comments
 (0)