diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/thread/Util.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/thread/Util.hxx b/src/thread/Util.hxx index d71230c20..62c5c6c2f 100644 --- a/src/thread/Util.hxx +++ b/src/thread/Util.hxx @@ -78,7 +78,13 @@ SetThreadRealtime() #ifdef __linux__ struct sched_param sched_param; sched_param.sched_priority = 50; - sched_setscheduler(0, SCHED_FIFO|SCHED_RESET_ON_FORK, &sched_param); + + int policy = SCHED_FIFO; +#ifdef SCHED_RESET_ON_FORK + policy |= SCHED_RESET_ON_FORK; +#endif + + sched_setscheduler(0, policy, &sched_param); #endif }; |