]> git.sesse.net Git - vlc/blobdiff - src/misc/threads.c
We need both priority scheduling and thread priority scheduling here
[vlc] / src / misc / threads.c
index b4da0f65765623356c16fba362ade4f84789caaa..149e761bb081df1fd8f173060dca356cf834c998 100644 (file)
@@ -784,7 +784,9 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
         pthread_sigmask (SIG_BLOCK, &set, &oldset);
     }
 
-#if (_POSIX_THREAD_PRIORITY_SCHEDULING >= 0)
+#if defined (_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING >= 0) \
+ && defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \
+ && (_POSIX_THREAD_PRIORITY_SCHEDULING >= 0)
     {
         struct sched_param sp = { .sched_priority = priority, };
         int policy;