diff --git a/parallel-rdp-standalone/COMMIT b/parallel-rdp-standalone/COMMIT index 61aa974..77d636e 100644 --- a/parallel-rdp-standalone/COMMIT +++ b/parallel-rdp-standalone/COMMIT @@ -1 +1 @@ -16d3a27eab1af53021bf6a49807e5e0720862bd3 +e564cbc01a49d2d94d90e60cc5c2f406d9ac4aad diff --git a/parallel-rdp-standalone/util/thread_name.cpp b/parallel-rdp-standalone/util/thread_name.cpp index 91d424f..e875dbe 100644 --- a/parallel-rdp-standalone/util/thread_name.cpp +++ b/parallel-rdp-standalone/util/thread_name.cpp @@ -22,7 +22,7 @@ #include "thread_name.hpp" -#ifdef __linux__ +#if !defined(_WIN32) #include #else #define WIN32_LEAN_AND_MEAN @@ -34,9 +34,11 @@ namespace Util { void set_current_thread_name(const char *name) { -#ifdef __linux__ +#if defined(__linux__) pthread_setname_np(pthread_self(), name); -#else +#elif defined(__APPLE__) + pthread_setname_np(name); +#elif defined(_WIN32) using PFN_SetThreadDescription = HRESULT (WINAPI *)(HANDLE, PCWSTR); auto module = GetModuleHandleA("kernel32.dll"); PFN_SetThreadDescription SetThreadDescription = module ? reinterpret_cast( @@ -54,4 +56,4 @@ void set_current_thread_name(const char *name) } #endif } -} \ No newline at end of file +}