aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-07 14:26:22 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-07 14:26:22 +0100
commit44c32e4ca7aa54009b4af55678407a71e6965327 (patch)
tree2dec0b33731207a9e0d2547b975afa226cb6de6b
parent6da31a1c9f88710011b615c8efd0cf9895a45822 (diff)
downloadlibmicrohttpd-44c32e4ca7aa54009b4af55678407a71e6965327.tar.gz
libmicrohttpd-44c32e4ca7aa54009b4af55678407a71e6965327.zip
fix #6078
-rw-r--r--m4/ax_pthread.m413
1 files changed, 10 insertions, 3 deletions
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 5fbf9fe0..0300e4ed 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -82,7 +82,7 @@
82# modified version of the Autoconf Macro, you may extend this special 82# modified version of the Autoconf Macro, you may extend this special
83# exception to the GPL to apply to your modified version as well. 83# exception to the GPL to apply to your modified version as well.
84 84
85#serial 24 85#serial 26
86 86
87AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) 87AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
88AC_DEFUN([AX_PTHREAD], [ 88AC_DEFUN([AX_PTHREAD], [
@@ -371,7 +371,13 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
371# if $ax_pthread_check_cond 371# if $ax_pthread_check_cond
372# error "$ax_pthread_check_macro must be defined" 372# error "$ax_pthread_check_macro must be defined"
373# endif 373# endif
374 static void routine(void *a) { a = 0; } 374 static void *some_global = NULL;
375 static void routine(void *a)
376 {
377 /* To avoid any unused-parameter or
378 unused-but-set-parameter warning. */
379 some_global = a;
380 }
375 static void *start_routine(void *a) { return a; }], 381 static void *start_routine(void *a) { return a; }],
376 [pthread_t th; pthread_attr_t attr; 382 [pthread_t th; pthread_attr_t attr;
377 pthread_create(&th, 0, start_routine, 0); 383 pthread_create(&th, 0, start_routine, 0);
@@ -438,7 +444,8 @@ if test "x$ax_pthread_ok" = "xyes"; then
438 AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], 444 AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
439 [ax_cv_PTHREAD_PRIO_INHERIT], 445 [ax_cv_PTHREAD_PRIO_INHERIT],
440 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], 446 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
441 [[int i = PTHREAD_PRIO_INHERIT;]])], 447 [[int i = PTHREAD_PRIO_INHERIT;
448 return i;]])],
442 [ax_cv_PTHREAD_PRIO_INHERIT=yes], 449 [ax_cv_PTHREAD_PRIO_INHERIT=yes],
443 [ax_cv_PTHREAD_PRIO_INHERIT=no]) 450 [ax_cv_PTHREAD_PRIO_INHERIT=no])
444 ]) 451 ])