aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-15 22:09:37 -0700
committerChris Robinson <[email protected]>2017-09-15 22:09:37 -0700
commit724d6267c8e71bb28f129a820f2dcb67fa137e56 (patch)
tree1b93512b88528c524600f27f0072dc58fe9d2747 /CMakeLists.txt
parent653edd4b02ce9ea7eaf49a51be0b27c18cd3db63 (diff)
Add a check for pthread_setname_np with three parameters
As found in NetBSD.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a44371c6..7bb76f32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -623,6 +623,16 @@ int main()
}"
PTHREAD_SETNAME_NP_ONE_PARAM
)
+ CHECK_C_SOURCE_COMPILES("
+#include <pthread.h>
+#include <pthread_np.h>
+int main()
+{
+ pthread_setname_np(pthread_self(), \"%s\", \"testname\");
+ return 0;
+}"
+ PTHREAD_SETNAME_NP_THREE_PARAMS
+ )
ENDIF()
CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np "pthread.h;pthread_np.h" HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
ELSE()
@@ -639,6 +649,15 @@ int main()
}"
PTHREAD_SETNAME_NP_ONE_PARAM
)
+ CHECK_C_SOURCE_COMPILES("
+#include <pthread.h>
+int main()
+{
+ pthread_setname_np(pthread_self(), \"%s\", \"testname\");
+ return 0;
+}"
+ PTHREAD_SETNAME_NP_THREE_PARAMS
+ )
ENDIF()
CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np pthread.h HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
ENDIF()