summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx
diff options
context:
space:
mode:
author Branimir Karadžić <branimirkaradzic@gmail.com>2016-02-09 14:27:17 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-02-09 14:27:17 +0100
commita8c8ec182f5af929f5085b2cda1ca41be0f7c2be (patch)
tree7b52d9a6ec2c06464c3b89e3374a5af5db8fe71b /3rdparty/bx
parent0439abe3c7c3636dad33a93b77e7fb0e6d7f7fdf (diff)
Update BGFX with latest code (nw)
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)