Commit 858486fc authored by Federico G. Schwindt's avatar Federico G. Schwindt

Handle pthread_setname_np() and variants correctly

Send your kudos to POSIX for failing to provide a standard here.
parent c11fc5bd
......@@ -95,8 +95,14 @@ THR_SetName(const char *name)
#if defined(HAVE_PTHREAD_SET_NAME_NP)
pthread_set_name_np(pthread_self(), name);
#elif defined(HAVE_PTHREAD_SETNAME_NP)
#if defined(__APPLE__)
pthread_setname_np(name);
#elif defined(__NetBSD__)
pthread_setname_np(pthread_self(), "%s", name);
#else
pthread_setname_np(pthread_self(), name);
#endif
#endif
}
const char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment