Blob Blame History Raw
diff --git a/configure.ac b/configure.ac
index e5162c4..b82a33b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,10 +799,13 @@ AC_CHECK_DECLS([confstr])
 AC_CHECK_DECLS([printf])
 AC_CHECK_DECLS([sbrk])
 AC_CHECK_DECLS([setregid])
-AC_CHECK_DECLS[(setresuid, setresgid])
+dnl AC_CHECK_DECLS[(setresuid])
+dnl AC_CHECK_DECLS[(setresgid])
 AC_CHECK_DECLS([strcpy])
 AC_CHECK_DECLS([strsignal])
 
+AC_CHECK_FUNCS(setresuid setresgid)
+
 dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3)
 AC_CHECK_DECLS([strtold], [
     AC_MSG_CHECKING([for broken strtold])
diff --git a/shell.c b/shell.c
index 484d8a9..5c24922 100644
--- a/shell.c
+++ b/shell.c
@@ -1286,7 +1286,7 @@ disable_priv_mode ()
 {
   int e;
 
-#if HAVE_DECL_SETRESUID
+#if HAVE_SETRESUID
   if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0)
 #else
   if (setuid (current_user.uid) < 0)
@@ -1299,7 +1299,7 @@ disable_priv_mode ()
 	exit (e);
 #endif
     }
-#if HAVE_DECL_SETRESGID
+#if HAVE_SETRESGID
   if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0)
 #else
   if (setgid (current_user.gid) < 0)