From: Panu Matilainen Date: Tue, 5 Jan 2010 10:14:37 +0000 (+0200) Subject: Move sys/mman.h include out of system.h to the places that care X-Git-Tag: tznext/4.11.0.1.tizen20130304~2382 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5085ae9923d5995e5f285dc54f45b38cf3d09698;p=tools%2Flibrpm-tizen.git Move sys/mman.h include out of system.h to the places that care - 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 --- diff --git a/configure.ac b/configure.ac index 9b83e5a..bf53a75 100644 --- a/configure.ac +++ b/configure.ac @@ -358,7 +358,7 @@ AC_CHECK_HEADERS(limits.h) 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) diff --git a/lib/fsm.c b/lib/fsm.c index 3bddbc9..fc972a0 100644 --- a/lib/fsm.c +++ b/lib/fsm.c @@ -6,6 +6,10 @@ #include "system.h" #include +#if defined(HAVE_MMAP) +#include +#endif + #include #include #include diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index 454d8e3..9252443 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -13,6 +13,10 @@ #endif +#if defined(HAVE_MMAP) +#include +#endif + #include #include diff --git a/system.h b/system.h index bbdcb48..8e9d744 100644 --- a/system.h +++ b/system.h @@ -97,10 +97,6 @@ char *getenv (const char *name); #include -#if HAVE_SYS_MMAN_H -#include -#endif - #if HAVE_SYS_WAIT_H #include #endif