diff options
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r-- | src/pulse/context.c | 12 |
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); |