summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bx')
-rw-r--r--3rdparty/bx/include/bx/allocator.h2
-rw-r--r--3rdparty/bx/include/bx/thread.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/3rdparty/bx/include/bx/allocator.h b/3rdparty/bx/include/bx/allocator.h
index 3a6ca4f6e26..50d526535b6 100644
--- a/3rdparty/bx/include/bx/allocator.h
+++ b/3rdparty/bx/include/bx/allocator.h
@@ -13,7 +13,7 @@
#include <new>
#if BX_CONFIG_ALLOCATOR_CRT
-# include <stdlib.h>
+# include <malloc.h>
#endif // BX_CONFIG_ALLOCATOR_CRT
#if BX_CONFIG_ALLOCATOR_DEBUG
diff --git a/3rdparty/bx/include/bx/thread.h b/3rdparty/bx/include/bx/thread.h
index fb9e07df6f8..015bd57eff8 100644
--- a/3rdparty/bx/include/bx/thread.h
+++ b/3rdparty/bx/include/bx/thread.h
@@ -8,6 +8,9 @@
#if BX_PLATFORM_POSIX
# include <pthread.h>
+# if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
+# include <sys/prctl.h>
+# endif // defined(__GLIBC__) ...
#elif BX_PLATFORM_WINRT
using namespace Platform;
using namespace Windows::Foundation;
@@ -149,7 +152,13 @@ namespace bx
{
#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
pthread_setname_np(_name);
-#elif (BX_PLATFORM_LINUX && defined(__GLIBC__)) || BX_PLATFORM_BSD
+#elif BX_PLATFORM_LINUX
+# if defined(__GLIBC__) && (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) )
+ pthread_setname_np(m_handle, _name);
+# else
+ prctl(PR_SET_NAME,_name, 0, 0, 0);
+# endif // defined(__GLIBC__) ...
+#elif BX_PLATFORM_BSD
pthread_setname_np(m_handle, _name);
#elif BX_PLATFORM_WINDOWS && BX_COMPILER_MSVC
# pragma pack(push, 8)