#include <config.h>
#endif
-/* setresuid() is only available on GNU */
-#define _GNU_SOURCE
-
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#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();
#endif
}
+#else
+
+void pa_drop_root(void) {
+}
+
+#endif
+
#ifdef HAVE_SYS_CAPABILITY_H
/* Limit capabilities set to CAPSYS_NICE */