]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3584: Detection of setresuid() is broken
authorOle Christensen <olechristensende@aol.de>
Mon, 16 Jul 2012 06:21:08 +0000 (00:21 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 16 Jul 2012 06:21:08 +0000 (00:21 -0600)
acinclude/os-deps.m4

index 3c8ace52d973112ce3f7a11d63597cfda4b23087..af09ac92be0c14fbdde03cdd3b7768ada9627f16 100644 (file)
@@ -829,14 +829,21 @@ void squid_getprotobynumber(void) {
   SQUID_STATE_ROLLBACK(winsock)
 ])
 
-
 dnl check that setresuid is properly implemented.
 dnl sets squid_cv_resuid_works to "yes" or "no"
 AC_DEFUN([SQUID_CHECK_SETRESUID_WORKS],[
   AC_CACHE_CHECK(if setresuid is actually implemented, squid_cv_resuid_works,
     AC_RUN_IFELSE([
       AC_LANG_SOURCE([[
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
   int main(int argc, char **argv) {
     if(setresuid(-1,-1,-1)) {
       perror("setresuid:");