diff options
-rw-r--r-- | Alc/threads.c | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | config.h.in | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Alc/threads.c b/Alc/threads.c index 3a0d1a22..e1d071ac 100644 --- a/Alc/threads.c +++ b/Alc/threads.c @@ -392,7 +392,7 @@ int almtx_init(almtx_t *mtx, int type) if(type == almtx_recursive) { ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); -#ifdef HAVE_PTHREAD_NP_H +#ifdef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP if(ret != 0) ret = pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE); #endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 82756531..d820fecf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -488,6 +488,9 @@ IF(NOT HAVE_WINDOWS_H) IF(NOT HAVE_PTHREAD_SETNAME_NP) CHECK_SYMBOL_EXISTS(pthread_set_name_np pthread.h HAVE_PTHREAD_SET_NAME_NP) ENDIF() + IF(HAVE_PTHREAD_NP_H) + CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np "pthread.h;pthread_np.h" HAVE_PTHREAD_MUTEXATTR_SETKIND_NP) + ENDIF() CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT) IF(HAVE_LIBRT) diff --git a/config.h.in b/config.h.in index bcdc1075..5e6d0862 100644 --- a/config.h.in +++ b/config.h.in @@ -175,3 +175,6 @@ /* Define if we have pthread_set_name_np() */ #cmakedefine HAVE_PTHREAD_SET_NAME_NP + +/* Define if we have pthread_mutexattr_setkind_np() */ +#cmakedefine HAVE_PTHREAD_MUTEXATTR_SETKIND_NP |