]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: dev: Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage
authorOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 07:31:54 +0000 (07:31 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 07:31:54 +0000 (07:31 +0000)
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.

Merge branch 'ondrej/fix-adaptive-mutex-use' into 'main'

See merge request isc-projects/bind9!9111


Trivial merge