diff options
author | Chris Robinson <[email protected]> | 2008-05-15 21:35:51 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-05-15 21:35:51 -0700 |
commit | cad9b367a51f3efaefa666d68379fb21e1352678 (patch) | |
tree | 6a3b8d0e6847a0c865236fab0c6952a07167416e /CMakeLists.txt | |
parent | 6e86146a25a629cd5f189a2aaa803d0c34a970e4 (diff) |
Use pthread_mutexattr_setkind_np as a fallback to set a recursive mutex type
Some systems (FreeBSD) don't like setting it through pthread_mutexattr_settype
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f2af7e7f..f1c38727 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,6 +167,9 @@ IF(NOT HAVE_WINDOWS_H) MESSAGE(FATAL_ERROR "PThreads is required for non-Windows builds!") ENDIF() + # Some systems need pthread_np.h to get recursive mutexes + CHECK_INCLUDE_FILES("pthread.h;pthread_np.h" HAVE_PTHREAD_NP_H) + # _GNU_SOURCE is needed on some systems for extra attributes, and # _REENTRANT is needed for libc thread-safety ADD_DEFINITIONS(-D_GNU_SOURCE=1 -D_REENTRANT) |