]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] fix: dev: Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage
authorOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 09:13:14 +0000 (09:13 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 09:13:14 +0000 (09:13 +0000)
commit46caf5f4a4522d42480aee4d5949ea9546f98c2f
tree42ae424ff0e0d28f26e7b7b8b3f028cf90fcaac3
parent4098157e6ce98910ff99c58c41c6cf8069b79cc7
parent80738e98bd4ce756db2e8210b687c49bf73b2277
[9.20] fix: dev: 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.

Backport of https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/9111

Merge branch 'backport-ondrej/fix-adaptive-mutex-use-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9240