Kaynağa Gözat

Merge pull request #113 from velkyel/master

fix freebsd
Branimir Karadžić 9 yıl önce
ebeveyn
işleme
7c1f8f6384
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      include/bx/thread.h

+ 4 - 1
include/bx/thread.h

@@ -8,6 +8,9 @@
 
 #if BX_PLATFORM_POSIX
 #	include <pthread.h>
+#	if BX_PLATFORM_BSD
+#		include <pthread_np.h>
+#	endif
 #	if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) )
 #		include <sys/prctl.h>
 #	endif // defined(__GLIBC__) ...
@@ -164,7 +167,7 @@ namespace bx
 #ifdef __NetBSD__
 			pthread_setname_np(m_handle, "%s", (void *)_name);
 #else
-			pthread_setname_np(m_handle, _name);
+			pthread_set_name_np(m_handle, _name);
 #endif
 #elif BX_PLATFORM_WINDOWS && BX_COMPILER_MSVC
 #	pragma pack(push, 8)