Browse Source

Thread: Re-add pthread_np.h include for FreeBSD/OpenBSD

Was a regression from #45315.

Fixes #46998.

(cherry picked from commit 7a64819c2fa839eb6ce198285fdc2dc65493d062)
Rémi Verschelde 4 years ago
parent
commit
76b375e6a3
1 changed files with 4 additions and 0 deletions
  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/os/thread.h"
 #include "core/ustring.h"
 #include "core/ustring.h"
 
 
+#ifdef PTHREAD_BSD_SET_NAME
+#include <pthread_np.h>
+#endif
+
 static Error set_name(const String &p_name) {
 static Error set_name(const String &p_name) {
 #ifdef PTHREAD_NO_RENAME
 #ifdef PTHREAD_NO_RENAME
 	return ERR_UNAVAILABLE;
 	return ERR_UNAVAILABLE;