Fix compilation against musl lib C (#7875)
Summary: See https://github.com/percona/PerconaFT/pull/450 Pull Request resolved: https://github.com/facebook/rocksdb/pull/7875 Reviewed By: ajkr Differential Revision: D25938020 Pulled By: jay-zhuang fbshipit-source-id: 9014dbc7b23bf92c5e63bfbdda4565bb0d2f2b58
This commit is contained in:
parent
5884cf5d5b
commit
9857d45f37
@ -153,7 +153,12 @@ typedef struct toku_mutex_aligned {
|
|||||||
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
|
{ .pmutex = PTHREAD_MUTEX_INITIALIZER, .psi_mutex = nullptr }
|
||||||
#endif // defined(TOKU_PTHREAD_DEBUG)
|
#endif // defined(TOKU_PTHREAD_DEBUG)
|
||||||
#else // __FreeBSD__, __linux__, at least
|
#else // __FreeBSD__, __linux__, at least
|
||||||
|
#if defined(__GLIBC__)
|
||||||
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_ADAPTIVE_NP
|
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_ADAPTIVE_NP
|
||||||
|
#else
|
||||||
|
// not all libc (e.g. musl) implement NP (Non-POSIX) attributes
|
||||||
|
#define TOKU_MUTEX_ADAPTIVE PTHREAD_MUTEX_DEFAULT
|
||||||
|
#endif
|
||||||
#if defined(TOKU_PTHREAD_DEBUG)
|
#if defined(TOKU_PTHREAD_DEBUG)
|
||||||
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
|
#define TOKU_ADAPTIVE_MUTEX_INITIALIZER \
|
||||||
{ \
|
{ \
|
||||||
|
Loading…
Reference in New Issue
Block a user