瀏覽代碼

fix freebsd

Libor Capak 9 年之前
父節點
當前提交
74e9c84a59
共有 1 個文件被更改,包括 4 次插入1 次删除
  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)