diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/qthread_unix.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 5a6ad877e..0c1790c2d 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -331,7 +331,10 @@ void TQThread::start(Priority priority) pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); -#if !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0) +#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0) +#if _POSIX_THREAD_PRIORITY_SCHEDULING == 0 && defined _SC_THREAD_PRIORITY_SCHEDULING + if (sysconf(_SC_THREAD_PRIORITY_SCHEDULING) > 0) +#endif switch (priority) { case InheritPriority: { |