aboutsummaryrefslogtreecommitdiffstats
path: root/common
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 /common
parent653edd4b02ce9ea7eaf49a51be0b27c18cd3db63 (diff)
Add a check for pthread_setname_np with three parameters
As found in NetBSD.
Diffstat (limited to 'common')
-rw-r--r--common/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/threads.c b/common/threads.c
index 0761a324..dbd196e8 100644
--- a/common/threads.c
+++ b/common/threads.c
@@ -500,6 +500,8 @@ void althrd_setname(althrd_t thr, const char *name)
#if defined(PTHREAD_SETNAME_NP_ONE_PARAM)
if(althrd_equal(thr, althrd_current()))
pthread_setname_np(name);
+#elif defined(PTHREAD_SETNAME_NP_THREE_PARAMS)
+ pthread_setname_np(thr, "%s", (void*)name);
#else
pthread_setname_np(thr, name);
#endif