diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
commit | 60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch) | |
tree | 1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /osdep/threads-posix.h | |
parent | Adding upstream version 0.37.0. (diff) | |
download | mpv-85641ae1aad608329bed81c5ced87e668b7f629e.tar.xz mpv-85641ae1aad608329bed81c5ced87e668b7f629e.zip |
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | osdep/threads-posix.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h index 482e4a8..4b3bb90 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" @@ -97,7 +102,7 @@ typedef pthread_once_t mp_once; typedef pthread_t mp_thread_id; typedef pthread_t mp_thread; -#define MP_STATIC_COND_INITIALIZER (mp_cond){ .cond = PTHREAD_COND_INITIALIZER, .clk_id = CLOCK_REALTIME } +#define MP_STATIC_COND_INITIALIZER { .cond = PTHREAD_COND_INITIALIZER, .clk_id = CLOCK_REALTIME } #define MP_STATIC_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #define MP_STATIC_ONCE_INITIALIZER PTHREAD_ONCE_INIT @@ -230,7 +235,7 @@ static inline void mp_thread_set_name(const char *name) } #elif HAVE_BSD_THREAD_NAME pthread_set_name_np(pthread_self(), name); -#elif HAVE_OSX_THREAD_NAME +#elif HAVE_MAC_THREAD_NAME pthread_setname_np(name); #endif } |