- just two places where needed, dont pollute system.h needlessly
- include depending on HAVE_MMAP instead of separately checking for
sys/mman.h, if sys/mman.h doesn't exist or is broken HAVE_MMAP wont be set
AC_CHECK_HEADERS(fcntl.h getopt.h memory.h)
AC_CHECK_HEADERS(sys/ipc.h)
-AC_CHECK_HEADERS(sys/mman.h sys/utsname.h sys/wait.h)
+AC_CHECK_HEADERS(sys/utsname.h sys/wait.h)
AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h)
#include "system.h"
#include <utime.h>
+#if defined(HAVE_MMAP)
+#include <sys/mman.h>
+#endif
+
#include <rpm/rpmte.h>
#include <rpm/rpmts.h>
#include <rpm/rpmsq.h>
#endif
+#if defined(HAVE_MMAP)
+#include <sys/mman.h>
+#endif
+
#include <popt.h>
#include <rpm/rpmfileutil.h>
#include <ctype.h>
-#if HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif