From: Roland Scheidegger Date: Sat, 26 Aug 2017 15:08:07 +0000 (+0200) Subject: util: only use SCHED_IDLE in pthread_setschedparam() when it's defined X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c92fe8a8c50968a6ac37cbecdd54208f0eea246c;p=mesa.git util: only use SCHED_IDLE in pthread_setschedparam() when it's defined Fixes build error when it's not. Reviewed-by: Jose Fonseca --- diff --git a/src/util/u_queue.c b/src/util/u_queue.c index 49361c3dadf..449da7dc9ab 100644 --- a/src/util/u_queue.c +++ b/src/util/u_queue.c @@ -246,7 +246,7 @@ util_queue_init(struct util_queue *queue, } if (flags & UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY) { - #if defined(__linux__) + #if defined(__linux__) && defined(SCHED_IDLE) struct sched_param sched_param = {0}; /* The nice() function can only set a maximum of 19.