Blame SOURCES/autoconf-2.13-headers.patch

d9d0ed
--- autoconf-2.13/acspecific.m4.orig	Fri Jun 29 16:26:39 2001
d9d0ed
+++ autoconf-2.13/acspecific.m4	Fri Jun 29 16:26:39 2001
d9d0ed
@@ -1010,7 +1043,7 @@
d9d0ed
 ])
d9d0ed
 
d9d0ed
 AC_DEFUN(AC_FUNC_MMAP,
d9d0ed
-[AC_CHECK_HEADERS(unistd.h)
d9d0ed
+[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
d9d0ed
 AC_CHECK_FUNCS(getpagesize)
d9d0ed
 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
d9d0ed
 [AC_TRY_RUN([
d9d0ed
@@ -1039,11 +1072,24 @@
d9d0ed
 #include <fcntl.h>
d9d0ed
 #include <sys/mman.h>
d9d0ed
 
d9d0ed
+#if HAVE_SYS_TYPES_H
d9d0ed
+# include <sys/types.h>
d9d0ed
+#endif
d9d0ed
+
d9d0ed
+#if HAVE_STDLIB_H
d9d0ed
+# include <stdlib.h>
d9d0ed
+#endif
d9d0ed
+
d9d0ed
+#if HAVE_SYS_STAT_H
d9d0ed
+# include <sys/stat.h>
d9d0ed
+#endif
d9d0ed
+
d9d0ed
+#if HAVE_UNISTD_H
d9d0ed
+# include <unistd.h>
d9d0ed
+#endif
d9d0ed
+
d9d0ed
 /* This mess was copied from the GNU getpagesize.h.  */
d9d0ed
 #ifndef HAVE_GETPAGESIZE
d9d0ed
-# ifdef HAVE_UNISTD_H
d9d0ed
-#  include <unistd.h>
d9d0ed
-# endif
d9d0ed
 
d9d0ed
 /* Assume that all systems that can run configure have sys/param.h.  */
d9d0ed
 # ifndef HAVE_SYS_PARAM_H