From 4c819baad3c2246cccef033bf9f1e5538bb79ed3 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 24 Jun 2020 06:25:48 +0100 Subject: [PATCH] vkd3d: Use pthread reimplementation only on MSVC We can use pthreads properly under MinGW --- include/private/vkd3d_threads.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/private/vkd3d_threads.h b/include/private/vkd3d_threads.h index 90c6c5fe..61ace94a 100644 --- a/include/private/vkd3d_threads.h +++ b/include/private/vkd3d_threads.h @@ -21,7 +21,7 @@ #include "vkd3d_memory.h" -#if defined(_WIN32) +#if defined(_MSC_VER) #define WIN32_LEAN_AND_MEAN #include @@ -147,14 +147,12 @@ static inline void vkd3d_set_thread_name(const char *name) { (void)name; } -#elif defined(__linux__) +#else #include static inline void vkd3d_set_thread_name(const char *name) { pthread_setname_np(pthread_self(), name); } -#else -#error "Threads are not supported. Cannot build." #endif