Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/core/AsyncLogWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
#define NOMINMAX
#endif
#include <windows.h>
#if defined(__MINGW32__)
Comment thread
jensenpat marked this conversation as resolved.
Comment thread
jensenpat marked this conversation as resolved.
// This mingw-w64 header snapshot doesn't declare SetThreadDescription even
// though kernel32.dll exports it (Windows 10 1607+, MSVC's SDK already has
// it). Widening _WIN32_WINNT doesn't help — the prototype is absent outright.
extern "C" __declspec(dllimport) HRESULT WINAPI
SetThreadDescription(HANDLE hThread, PCWSTR lpThreadDescription);
Comment thread
jensenpat marked this conversation as resolved.
#endif
#elif defined(__APPLE__)
#include <pthread.h>
#elif defined(__linux__)
Expand Down
7 changes: 7 additions & 0 deletions src/core/SystemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
#endif
#include <windows.h>
#include <tlhelp32.h>
#if defined(__MINGW32__)
// This mingw-w64 header snapshot doesn't declare GetThreadDescription even
// though kernel32.dll exports it (Windows 10 1607+, MSVC's SDK already has
// it). Widening _WIN32_WINNT doesn't help — the prototype is absent outright.
extern "C" __declspec(dllimport) HRESULT WINAPI
GetThreadDescription(HANDLE hThread, PWSTR* ppszThreadDescription);
#endif
#elif defined(Q_OS_MAC)
#include <mach/mach.h>
#include <mach/thread_act.h>
Expand Down
7 changes: 7 additions & 0 deletions src/core/ThreadName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
#endif
#include <windows.h>
#include <cstdlib>
#if defined(__MINGW32__)
// This mingw-w64 header snapshot doesn't declare SetThreadDescription even
// though kernel32.dll exports it (Windows 10 1607+, MSVC's SDK already has
// it). Widening _WIN32_WINNT doesn't help — the prototype is absent outright.
extern "C" __declspec(dllimport) HRESULT WINAPI
SetThreadDescription(HANDLE hThread, PCWSTR lpThreadDescription);
#endif
Comment thread
jensenpat marked this conversation as resolved.
#elif defined(__APPLE__)
#include <pthread.h>
#elif defined(__linux__)
Expand Down
Loading