2024-03-12 03:36:30 +00:00
|
|
|
--- a/src/tests/tests.h
|
|
|
|
+++ b/src/tests/tests.h
|
|
|
|
@@ -17,6 +17,9 @@
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <optional>
|
|
|
|
+#ifndef __ANDROID__
|
|
|
|
+#include <ranges>
|
|
|
|
+#endif
|
|
|
|
#include <set>
|
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
--- a/src/lib/utils/os_utils.cpp
|
|
|
|
+++ b/src/lib/utils/os_utils.cpp
|
|
|
|
@@ -627,6 +627,8 @@
|
|
|
|
static_cast<void>(pthread_set_name_np(thread.native_handle(), name.c_str()));
|
|
|
|
#elif defined(BOTAN_TARGET_OS_IS_NETBSD)
|
2024-03-23 09:01:09 +08:00
|
|
|
static_cast<void>(pthread_setname_np(thread.native_handle(), "%s", const_cast<char*>(name.c_str())));
|
2024-03-12 03:36:30 +00:00
|
|
|
+ #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");
|