]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage
authorOndřej Surý <ondrej@isc.org>
Tue, 18 Jun 2024 13:21:52 +0000 (15:21 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 09:13:07 +0000 (09:13 +0000)
commit80738e98bd4ce756db2e8210b687c49bf73b2277
tree42ae424ff0e0d28f26e7b7b8b3f028cf90fcaac3
parent5d76ef21f01eb0474000805d3060999fc86bb51f
Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage

The PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP are
usually not defines, but enum values, so simple preprocessor check
doesn't work.

Check for PTHREAD_MUTEX_ADAPTIVE_NP from the autoconf AS_COMPILE_IFELSE
block and define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP.  This should enable
adaptive mutex on Linux and FreeBSD.

As PTHREAD_MUTEX_ERRORCHECK actually comes from POSIX and Linux glibc
does define it when compatibility macros are being set, we can just use
PTHREAD_MUTEX_ERRORCHECK instead of PTHREAD_MUTEX_ERRORCHECK_NP.

(cherry picked from commit cc4f99bc6d6c82ed869caef1bccbb02821f9919d)
configure.ac
lib/isc/mutex.c