commit 9432fca1252e37c192047a831a244392efa955be
parent 0ca55b1a26c99a30dca5596063367fb92bd4f05e
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Thu, 6 Aug 2026 10:27:36 +0200
configure: fixed check for pthread_sigmask()
Can be backported
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -2529,7 +2529,11 @@ AX_PTHREAD(
[
mhd_have_posix_threads='yes'
AC_DEFINE([[HAVE_PTHREAD_H]],[[1]],[Define to 1 if you have the <pthread.h> header file.])
+ SAVE_CC="$CC"
+ CC="$PTHREAD_CC"
CFLAGS="${CFLAGS_ac} ${PTHREAD_CFLAGS} ${user_CFLAGS}"
+ SAVE_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
MHD_CHECK_FUNC([pthread_sigmask],
[[
#include <pthread.h>
@@ -2543,7 +2547,11 @@ AX_PTHREAD(
]],
[AC_DEFINE([[HAVE_PTHREAD_SIGMASK]],[[1]],[Define to 1 if you have the pthread_sigmask(3) function.])]
)
+ CC="$SAVE_CC"
+ AS_UNSET([SAVE_CC])
CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LIBS="$SAVE_LIBS"
+ AS_UNSET([SAVE_LIBS])
],[[mhd_have_posix_threads='no']])
AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$mhd_have_posix_threads" = "xyes"])