summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Maldonado aka Yukiteru <josemald89@gmail.com>2024-02-14 16:22:02 -0400
committerDudemanguy <random342@airmail.cc>2024-02-15 16:46:12 +0000
commit293532057ee91a6f52434d6408a836781cfc1573 (patch)
treed450c98b8326e9db5ebe9fe7a8e6cf966a4a7ce5
parente19061605f7858a0639134aa4744809c5e151ae2 (diff)
downloadmpv-293532057ee91a6f52434d6408a836781cfc1573.tar.bz2
mpv-293532057ee91a6f52434d6408a836781cfc1573.tar.xz
osdep/threads-posix: fix headers for OpenBSD build
In OpenBSD the compilation fail because osdep/threads-posix.h need include pthread_np.h
-rw-r--r--osdep/threads-posix.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h
index 482e4a8f67..4cda0bebfc 100644
--- a/osdep/threads-posix.h
+++ b/osdep/threads-posix.h
@@ -23,6 +23,11 @@
#include "common/common.h"
#include "config.h"
+// We make use of NON-POSIX pthreads functions and certain systems
+// require this header to build without issues. (ex: OpenBSD)
+#if HAVE_BSD_THREAD_NAME
+#include <pthread_np.h>
+#endif
#include "osdep/compiler.h"
#include "timer.h"