Files
MINGW-packages/mingw-w64-libbotan/003-no-pthread.patch
2025-05-09 00:37:10 +02:00

13 lines
905 B
Diff

--- Botan-3.8.1/src/lib/utils/os_utils/os_utils.cpp.orig 2025-05-08 23:36:50.593413800 +0200
+++ Botan-3.8.1/src/lib/utils/os_utils/os_utils.cpp 2025-05-08 23:37:04.652931900 +0200
@@ -664,9 +664,7 @@
static_cast<void>(pthread_set_name_np(thread.native_handle(), name.c_str()));
#elif defined(BOTAN_TARGET_OS_IS_NETBSD)
static_cast<void>(pthread_setname_np(thread.native_handle(), "%s", const_cast<char*>(name.c_str())));
- #elif defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
- static_cast<void>(pthread_setname_np(thread.native_handle(), name.c_str()));
#elif defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(BOTAN_BUILD_COMPILER_IS_MSVC)
typedef HRESULT(WINAPI * std_proc)(HANDLE, PCWSTR);
HMODULE kern = GetModuleHandleA("KernelBase.dll");
std_proc set_thread_name = reinterpret_cast<std_proc>(GetProcAddress(kern, "SetThreadDescription"));