Skip to content

Commit

Permalink
Merge pull request #3934 from solemnwarning/fix-build
Browse files Browse the repository at this point in the history
Fix build using clang/libc++/winpthread on Windows.
  • Loading branch information
randombit committed Mar 19, 2024
2 parents 8c5e9c3 + c6165a5 commit 00a92b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/utils/os_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ void OS::set_thread_name(std::thread& thread, const std::string& name) {
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");
Expand Down
1 change: 1 addition & 0 deletions src/tests/tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <map>
#include <memory>
#include <optional>
#include <ranges>
#include <set>
#include <sstream>
#include <string>
Expand Down

0 comments on commit 00a92b6

Please sign in to comment.