diff options
author | wm4 <wm4@nowhere> | 2014-10-22 01:02:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-22 01:04:52 +0200 |
commit | 2e81698d2809836d4cd7f754a78598e7bdf96c0b (patch) | |
tree | 46054afb396609088960aa566aaf774323ac4524 /osdep/threads.c | |
parent | 7eb047b2417d9b6cc3690fba75a50967a315955c (diff) | |
download | mpv-2e81698d2809836d4cd7f754a78598e7bdf96c0b.tar.bz2 mpv-2e81698d2809836d4cd7f754a78598e7bdf96c0b.tar.xz |
osdep: NetBSD pthread_setname_np()
From: bugmen0t on github
Fixes #1207.
Diffstat (limited to 'osdep/threads.c')
-rw-r--r-- | osdep/threads.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/threads.c b/osdep/threads.c index 7a6174eb79..6ef08dbf49 100644 --- a/osdep/threads.c +++ b/osdep/threads.c @@ -19,6 +19,10 @@ #include "config.h" +#if HAVE_BSD_THREAD_NAME +#include <pthread_np.h> +#endif + #include "threads.h" #include "timer.h" @@ -56,6 +60,8 @@ void mpthread_set_name(const char *name) } #elif HAVE_BSD_THREAD_NAME pthread_set_name_np(pthread_self(), tname); +#elif HAVE_NETBSD_THREAD_NAME + pthread_setname_np(pthread_self(), "%s", (void *)tname); #elif HAVE_OSX_THREAD_NAME pthread_setname_np(tname); #endif |