diff -Naur ntp-4.2.8p18.orig/sntp/m4/openldap-thread-check.m4 ntp-4.2.8p18/sntp/m4/openldap-thread-check.m4 --- ntp-4.2.8p18.orig/sntp/m4/openldap-thread-check.m4 2023-05-31 12:31:39.000000000 +0200 +++ ntp-4.2.8p18/sntp/m4/openldap-thread-check.m4 2025-03-26 11:54:16.029059000 +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 .