summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-01-06 00:51:33 +0100
committerMaarten Bosmans <mkbosmans@gmail.com>2011-02-17 11:58:22 +0100
commitbb12ff83564d43566089dd979639c6993ba76665 (patch)
tree1d7df88762eeba464971742328b7617ffb93f3b3 /src/daemon
parent0ac0479534d9cb6e4ef734eeb3a663f33a4f8ef3 (diff)
Apply #ifdefs around functionality not available on win32
And also the reverse: around some win32 specific functionality
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/daemon-conf.c5
-rw-r--r--src/daemon/dumpmodules.c2
-rw-r--r--src/daemon/ltdl-bind-now.c4
-rw-r--r--src/daemon/main.c2
4 files changed, 13 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;
diff --git a/src/daemon/dumpmodules.c b/src/daemon/dumpmodules.c
index 92470b49..d0504dc5 100644
--- a/src/daemon/dumpmodules.c
+++ b/src/daemon/dumpmodules.c
@@ -90,7 +90,9 @@ static void show_info(const char *name, const char *path, void (*info)(const cha
}
}
+#ifndef OS_IS_WIN32
extern const lt_dlsymlist lt_preloaded_symbols[];
+#endif
static int is_preloaded(const char *name) {
const lt_dlsymlist *l;
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index 276b2a06..2ba73ce7 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -51,6 +51,10 @@
#undef PA_BIND_NOW
#endif
+#ifdef OS_IS_WIN32
+#undef PA_BIND_NOW
+#endif
+
#ifdef PA_BIND_NOW
/*
diff --git a/src/daemon/main.c b/src/daemon/main.c
index cab275f3..5aeb9bc6 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -654,6 +654,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
+#ifdef HAVE_GETUID
if (getuid() == 0 && !conf->system_instance)
pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
#ifndef HAVE_DBUS /* A similar, only a notice worthy check was done earlier, if D-Bus is enabled. */
@@ -662,6 +663,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
#endif
+#endif /* HAVE_GETUID */
if (conf->cmd == PA_CMD_START && conf->system_instance) {
pa_log(_("--start not supported for system instances."));