--- pinentry-0.7.2/configure.ac	2005-01-27 09:04:19.000000000 +0100
+++ pinentry-0.7.2-patched/configure.ac	2005-01-28 19:14:04.000000000 +0100
@@ -124,6 +124,11 @@
 AC_SUBST(LIBCAP)
 
 dnl
+dnl Check if setresuid() is available
+dnl
+AC_CHECK_FUNCS(setresuid)
+
+dnl
 dnl Check for curses pinentry program.
 dnl
 AC_ARG_ENABLE(pinentry-curses,
--- pinentry-0.7.2/secmem/util.c	2004-12-22 12:38:10.000000000 +0100
+++ pinentry-0.7.2-patched/secmem/util.c	2005-01-28 19:17:21.342980000 +0100
@@ -129,7 +129,11 @@
   if (!uid_set)
     init_uids();
   if (real_uid != file_uid) {
+#ifdef HAVE_SETRESUID
+    if (setresuid(real_uid, real_uid, real_uid) < 0) {
+#else
     if (setuid(real_uid) < 0) {
+#endif
       perror("dropping privileges failed");
       exit(EXIT_FAILURE);
     }

