mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
core-util: Fix build on mingw32
mingw32 does not have "getuid", so ifdef it properly. Reported-by: Michael DePaulo <mikedep333@gmail.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
9793870b23
commit
686baf80d9
1 changed files with 2 additions and 0 deletions
|
|
@ -1816,6 +1816,7 @@ char *pa_get_runtime_dir(void) {
|
|||
/* Use the XDG standard for the runtime directory. */
|
||||
d = getenv("XDG_RUNTIME_DIR");
|
||||
if (d) {
|
||||
#ifdef HAVE_GETUID
|
||||
struct stat st;
|
||||
if (stat(d, &st) == 0 && st.st_uid != getuid()) {
|
||||
pa_log(_("XDG_RUNTIME_DIR (%s) is not owned by us (uid %d), but by uid %d! "
|
||||
|
|
@ -1823,6 +1824,7 @@ char *pa_get_runtime_dir(void) {
|
|||
d, getuid(), st.st_uid);
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
k = pa_sprintf_malloc("%s" PA_PATH_SEP "pulse", d);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue