瀏覽代碼

Merge pull request #47010 from akien-mga/modernized_thread_fix_freebsd

Thread: Re-add pthread_np.h include for FreeBSD/OpenBSD
Rémi Verschelde 4 年之前
父節點
當前提交
a4fd6d374c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/unix/thread_posix.cpp

+ 4 - 0
drivers/unix/thread_posix.cpp

@@ -35,6 +35,10 @@
 #include "core/os/thread.h"
 #include "core/string/ustring.h"
 
+#ifdef PTHREAD_BSD_SET_NAME
+#include <pthread_np.h>
+#endif
+
 static Error set_name(const String &p_name) {
 #ifdef PTHREAD_NO_RENAME
 	return ERR_UNAVAILABLE;