diff --git a/recipes/net/ntp.yaml b/recipes/net/ntp.yaml index 33f9ac72..a5ed87a2 100644 --- a/recipes/net/ntp.yaml +++ b/recipes/net/ntp.yaml @@ -1,4 +1,4 @@ -inherit: [autotools] +inherit: [autoconf, autotools, patch] metaEnvironment: PKG_VERSION: "4.2.8p18" @@ -19,8 +19,18 @@ checkoutSCM: digestSHA1: 9b5247a8576c6082900682c6de98c8d3c17fc15f stripComponents: 1 +checkoutDeterministic: True +checkoutScript: | + patchApplySeries $<@ntp/*.patch@> + buildScript: | - autotoolsBuild $1 \ + SRC=$(pwd)/src + autoconfSync $1 $SRC + pushd $SRC + autoconfReconfigure -u + popd + + autotoolsBuild $SRC \ --with-shared \ --program-transform-name=s,,, \ --disable-tickadj \ diff --git a/recipes/net/ntp/0003-fix-pthread-detach-check.patch b/recipes/net/ntp/0003-fix-pthread-detach-check.patch new file mode 100644 index 00000000..fa8bf41d --- /dev/null +++ b/recipes/net/ntp/0003-fix-pthread-detach-check.patch @@ -0,0 +1,16 @@ +diff -ru a/sntp/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4 +--- a/sntp/m4/openldap-thread-check.m4 2023-05-31 12:31:39.000000000 +0200 ++++ b/sntp/m4/openldap-thread-check.m4 2026-02-25 23:18:38.319727258 +0100 +@@ -262,10 +262,8 @@ + dnl save the flags + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-#ifndef NULL +-#define NULL (void*)0 +-#endif +-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) ++pthread_t thread; ++]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) + ]) + + if test $ol_cv_func_pthread_detach = no ; then