summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--3rdparty/bx/include/bx/thread.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/3rdparty/bx/include/bx/thread.h b/3rdparty/bx/include/bx/thread.h
index add66ab3514..9e105db1422 100644
--- a/3rdparty/bx/include/bx/thread.h
+++ b/3rdparty/bx/include/bx/thread.h
@@ -8,7 +8,7 @@
#if BX_PLATFORM_POSIX
# include <pthread.h>
-# if BX_PLATFORM_BSD
+# if defined(BX_PLATFORM_BSD) && !defined(__GLIBC__)
# include <pthread_np.h>
# endif
# if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
@@ -157,12 +157,10 @@ namespace bx
{
#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
pthread_setname_np(_name);
-#elif BX_PLATFORM_LINUX
-# if defined(__GLIBC__) && (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) )
+#elif defined(__GLIBC__) && (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) )
pthread_setname_np(m_handle, _name);
-# else
+#elif BX_PLATFORM_LINUX
prctl(PR_SET_NAME,_name, 0, 0, 0);
-# endif // defined(__GLIBC__) ...
#elif BX_PLATFORM_BSD
#ifdef __NetBSD__
pthread_setname_np(m_handle, "%s", (void *)_name);