summaryrefslogtreecommitdiffstats
path: root/src/daemon/daemon-conf.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2011-02-25 09:24:07 +0000
committerColin Guthrie <cguthrie@mandriva.org>2011-02-25 09:24:07 +0000
commita3dbdb044656e2f3ab9c7ae54fe74b9669155f2d (patch)
treed033464ab41e36f04763235160f1024afa0438b7 /src/daemon/daemon-conf.c
parentf51889c6f64f11221caba3615bf779fc19d0dd15 (diff)
parent821562b9bc8d1a9033daaae0fd5373498a085054 (diff)
Merge remote-tracking branch 'mkbosmans/mingw32-build'
Diffstat (limited to 'src/daemon/daemon-conf.c')
-rw-r--r--src/daemon/daemon-conf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 74e81351..3339f3b0 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -28,7 +28,10 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+
+#ifdef HAVE_SCHED_H
#include <sched.h>
+#endif
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
@@ -460,10 +463,12 @@ static int parse_rtprio(const char *filename, unsigned line, const char *section
pa_assert(rvalue);
pa_assert(data);
+#ifdef HAVE_SCHED_H
if (pa_atoi(rvalue, &rtprio) < 0 || rtprio < sched_get_priority_min(SCHED_FIFO) || rtprio > sched_get_priority_max(SCHED_FIFO)) {
pa_log("[%s:%u] Invalid realtime priority '%s'.", filename, line, rvalue);
return -1;
}
+#endif
c->realtime_priority = (int) rtprio;
return 0;