summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rw-r--r--epan/privileges.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 3cf2b8855e..9f7acfd716 100644
--- a/configure.in
+++ b/configure.in
@@ -1127,6 +1127,7 @@ else
fi
AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
+AC_CHECK_FUNCS(setresuid setresgid)
dnl libcap (not libpcap) check
LIBCAP_LIBS=''
diff --git a/epan/privileges.c b/epan/privileges.c
index e8c6d656e3..1728c91df8 100644
--- a/epan/privileges.c
+++ b/epan/privileges.c
@@ -26,6 +26,10 @@
# include "config.h"
#endif
+#if defined(HAVE_SETRESUID) || defined(HAVE_SETREGUID)
+#define _GNU_SOURCE /* Otherwise [sg]etres[gu]id won't be defined on Linux */
+#endif
+
#include <glib.h>
#include "privileges.h"