mdbx-posix: fix feature-testing for PTHREAD_MUTEX_ROBUST.

Change-Id: I16f008b8448a70d4145ba2bcfe22b3326c8a0e21
This commit is contained in:
Leonid Yuriev 2020-04-13 22:46:55 +03:00
parent abf38e97cc
commit 0986cb9379

View File

@ -79,8 +79,10 @@
/* Some platforms define the EOWNERDEAD error code even though they
* don't support Robust Mutexes. If doubt compile with -MDBX_LOCKING=2001. */
#if defined(EOWNERDEAD) && _POSIX_THREAD_PROCESS_SHARED >= 200809L && \
(defined(_POSIX_THREAD_ROBUST_PRIO_INHERIT) || \
defined(_POSIX_THREAD_ROBUST_PRIO_PROTECT) || \
((defined(_POSIX_THREAD_ROBUST_PRIO_INHERIT) && \
_POSIX_THREAD_ROBUST_PRIO_INHERIT > 0) || \
(defined(_POSIX_THREAD_ROBUST_PRIO_PROTECT) && \
_POSIX_THREAD_ROBUST_PRIO_PROTECT > 0) || \
defined(PTHREAD_MUTEX_ROBUST) || defined(PTHREAD_MUTEX_ROBUST_NP)) && \
(!defined(__GLIBC__) || \
__GLIBC_PREREQ(2, 10) /* troubles with Robust mutexes before 2.10 */)