]> code.delx.au - pulseaudio/blobdiff - polyp/caps.c
Merge Pierre's changes
[pulseaudio] / polyp / caps.c
index 01ed1519770e61ada2b60823a1e0227e9c688c2f..4ecb5848df174738280345e633a27328de892963 100644 (file)
@@ -23,9 +23,6 @@
 #include <config.h>
 #endif
 
-/* setresuid() is only available on GNU */
-#define _GNU_SOURCE
-
 #include <assert.h>
 #include <unistd.h>
 #include <errno.h>
@@ -38,6 +35,8 @@
 #include "log.h"
 #include "caps.h"
 
+#ifdef HAVE_GETUID
+
 /* Drop root rights when called SUID root */
 void pa_drop_root(void) {
     uid_t uid = getuid();
@@ -57,6 +56,13 @@ void pa_drop_root(void) {
 #endif
 }
 
+#else
+
+void pa_drop_root(void) {
+}
+
+#endif
+
 #ifdef HAVE_SYS_CAPABILITY_H
 
 /* Limit capabilities set to CAPSYS_NICE */