summaryrefslogtreecommitdiffstats
path: root/src/pulse/context.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/pulse/context.c
parentf51889c6f64f11221caba3615bf779fc19d0dd15 (diff)
parent821562b9bc8d1a9033daaae0fd5373498a085054 (diff)
Merge remote-tracking branch 'mkbosmans/mingw32-build'
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r--src/pulse/context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 7a539b4d..8f632b5d 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -39,9 +39,6 @@
#include <sys/wait.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
@@ -57,9 +54,7 @@
#include <pulse/mainloop.h>
#include <pulse/timeval.h>
-#include <pulsecore/winsock.h>
#include <pulsecore/core-error.h>
-
#include <pulsecore/native-common.h>
#include <pulsecore/pdispatch.h>
#include <pulsecore/pstream.h>
@@ -69,6 +64,7 @@
#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
+#include <pulsecore/socket.h>
#include <pulsecore/socket-util.h>
#include <pulsecore/creds.h>
#include <pulsecore/macro.h>
@@ -589,10 +585,12 @@ static char *get_old_legacy_runtime_dir(void) {
return NULL;
}
+#ifdef HAVE_GETUID
if (st.st_uid != getuid()) {
pa_xfree(p);
return NULL;
}
+#endif
return p;
}
@@ -611,10 +609,12 @@ static char *get_very_old_legacy_runtime_dir(void) {
return NULL;
}
+#ifdef HAVE_GETUID
if (st.st_uid != getuid()) {
pa_xfree(p);
return NULL;
}
+#endif
return p;
}
@@ -1001,6 +1001,7 @@ int pa_context_connect(
/* Set up autospawning */
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
+#ifdef HAVE_GETUID
if (getuid() == 0)
pa_log_debug("Not doing autospawn since we are root.");
else {
@@ -1009,6 +1010,7 @@ int pa_context_connect(
if (api)
c->spawn_api = *api;
}
+#endif
}
pa_context_set_state(c, PA_CONTEXT_CONNECTING);