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