| fix pthread_detach check |
| |
| Upstream: https://bugs.ntp.org/show_bug.cgi?id=3926 |
| |
| Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> |
| --- |
| sntp/m4/openldap-thread-check.m4 | 6 ++---- |
| 1 file changed, 2 insertions(+), 4 deletions(-) |
| |
| Index: ntp-4.2.8p17/sntp/m4/openldap-thread-check.m4 |
| =================================================================== |
| --- ntp-4.2.8p17.orig/sntp/m4/openldap-thread-check.m4 |
| +++ ntp-4.2.8p17/sntp/m4/openldap-thread-check.m4 |
| @@ -262,10 +262,8 @@ pthread_rwlock_t rwlock; |
| dnl save the flags |
| AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| #include <pthread.h> |
| -#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 |