0002-fix-pthread-detach-check.patch 917 B

1234567891011121314151617181920212223242526
  1. fix pthread_detach check
  2. Upstream: https://bugs.ntp.org/show_bug.cgi?id=3926
  3. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
  4. ---
  5. sntp/m4/openldap-thread-check.m4 | 6 ++----
  6. 1 file changed, 2 insertions(+), 4 deletions(-)
  7. Index: ntp-4.2.8p17/sntp/m4/openldap-thread-check.m4
  8. ===================================================================
  9. --- ntp-4.2.8p17.orig/sntp/m4/openldap-thread-check.m4
  10. +++ ntp-4.2.8p17/sntp/m4/openldap-thread-check.m4
  11. @@ -262,10 +262,8 @@ pthread_rwlock_t rwlock;
  12. dnl save the flags
  13. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  14. #include <pthread.h>
  15. -#ifndef NULL
  16. -#define NULL (void*)0
  17. -#endif
  18. -]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
  19. +pthread_t thread;
  20. +]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
  21. ])
  22. if test $ol_cv_func_pthread_detach = no ; then