diff options
Diffstat (limited to 'src/corelib')
| -rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 2b271d29448..00d2b87b7ea 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -344,11 +344,13 @@ template <typename String> static void setCurrentThreadName(QThread *thr, String &objectName) { auto setit = [](const char *name) { -# if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE) - prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); +# if defined(Q_OS_LINUX) + prctl(PR_SET_NAME, name); # elif defined(Q_OS_DARWIN) pthread_setname_np(name); -# elif defined(Q_OS_QNX) +# elif defined(Q_OS_OPENBSD) + pthread_set_name_np(pthread_self(), name); +# elif defined(Q_OS_QNX) || defined(Q_OS_BSD4) pthread_setname_np(pthread_self(), name); # else Q_UNUSED(name) |
