From 686baf80d92c47d8f1a41884b3e410ae9ec52e34 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Wed, 3 Dec 2014 12:46:28 +0100 Subject: [PATCH] core-util: Fix build on mingw32 mingw32 does not have "getuid", so ifdef it properly. Reported-by: Michael DePaulo Signed-off-by: David Henningsson --- src/pulsecore/core-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index e9843ef78..bf7f3d867 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -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);