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