summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/cpulimit.c2
-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.c14
5 files changed, 18 insertions, 9 deletions
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index f5042a75..c1c2a6f6 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -140,7 +140,7 @@ static void signal_handler(int sig) {
write_err("Soft CPU time limit exhausted, terminating.\n");
/* Try a soft cleanup */
- (void) write(the_pipe[1], &c, sizeof(c));
+ (void) pa_write(the_pipe[1], &c, sizeof(c), NULL);
phase = PHASE_SOFT;
reset_cpu_time(CPUTIME_INTERVAL_HARD);
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 cad6f70d..243e7c0a 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -43,10 +43,6 @@
#include <sys/mman.h>
#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
@@ -74,7 +70,7 @@
#include <pulse/i18n.h>
#include <pulsecore/lock-autospawn.h>
-#include <pulsecore/winsock.h>
+#include <pulsecore/socket.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-rtclock.h>
#include <pulsecore/core.h>
@@ -137,7 +133,7 @@ static void message_cb(pa_mainloop_api*a, pa_time_event*e, const struct timeval
}
pa_timeval_add(pa_gettimeofday(&tvnext), 100000);
- a->rtclock_time_restart(e, &tvnext);
+ a->time_restart(e, &tvnext);
}
#endif
@@ -658,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. */
@@ -666,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."));
@@ -984,7 +982,7 @@ int main(int argc, char *argv[]) {
#endif
#ifdef OS_IS_WIN32
- win32_timer = pa_mainloop_get_api(mainloop)->rtclock_time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
+ win32_timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
#endif
if (!conf->no_cpu_limit)
@@ -1080,7 +1078,7 @@ finish:
}
#ifdef OS_IS_WIN32
- if (win32_timer)
+ if (mainloop && win32_timer)
pa_mainloop_get_api(mainloop)->time_free(win32_timer);
#endif