mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
Apply #ifdefs around functionality not available on win32
And also the reverse: around some win32 specific functionality
This commit is contained in:
parent
0ac0479534
commit
bb12ff8356
20 changed files with 120 additions and 13 deletions
|
|
@ -585,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;
|
||||
}
|
||||
|
|
@ -607,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;
|
||||
}
|
||||
|
|
@ -997,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 {
|
||||
|
|
@ -1005,6 +1010,7 @@ int pa_context_connect(
|
|||
if (api)
|
||||
c->spawn_api = *api;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
pa_context_set_state(c, PA_CONTEXT_CONNECTING);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue