SetThreadDescription was added in https://github.com/mingw-w64/mingw-w64/commit/3a137bd87e commit.
19 lines
945 B
Diff
19 lines
945 B
Diff
--- a/vendor/adb/sysdeps_win32.cpp
|
|
+++ b/vendor/adb/sysdeps_win32.cpp
|
|
@@ -3089,13 +3089,13 @@
|
|
}
|
|
|
|
// The SetThreadDescription API was brought in version 1607 of Windows 10.
|
|
-typedef HRESULT(WINAPI* SetThreadDescription)(HANDLE hThread, PCWSTR lpThreadDescription);
|
|
+typedef HRESULT(WINAPI* SetThreadDescriptionFunc)(HANDLE hThread, PCWSTR lpThreadDescription);
|
|
|
|
// Based on PlatformThread::SetName() from
|
|
// https://cs.chromium.org/chromium/src/base/threading/platform_thread_win.cc
|
|
int adb_thread_setname(const std::string& name) {
|
|
// The SetThreadDescription API works even if no debugger is attached.
|
|
- auto set_thread_description_func = reinterpret_cast<SetThreadDescription>(
|
|
+ auto set_thread_description_func = reinterpret_cast<SetThreadDescriptionFunc>(
|
|
::GetProcAddress(::GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription"));
|
|
if (set_thread_description_func) {
|
|
std::wstring name_wide;
|