diff options
-rw-r--r-- | compat/thread-name.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/compat/thread-name.cpp b/compat/thread-name.cpp index da9aacd5..d12a59ca 100644 --- a/compat/thread-name.cpp +++ b/compat/thread-name.cpp @@ -8,8 +8,9 @@ namespace portable { -#if defined _MSC_VER +#ifdef _WIN32 +#ifdef _MSC_VER struct THREADNAME_INFO { DWORD dwType; // must be 0x1000 @@ -40,6 +41,11 @@ void set_curthread_name_old(const QString& name_) { } } +#else + +static inline void set_curthread_name_old(const QString&) {} + +#endif void set_curthread_name(const QString& name) { @@ -58,13 +64,6 @@ void set_curthread_name(const QString& name) } } -#elif defined _WIN32 - -void set_curthread_name(const QString& name) -{ - (void)name; -} - #else void set_curthread_name(const QString& name) |