diff options
author | Karel Zak | 2016-03-08 14:29:45 +0100 |
---|---|---|
committer | Karel Zak | 2016-03-08 14:29:45 +0100 |
commit | 075d2c0754f3723a68ad61755709fa2f0af604b4 (patch) | |
tree | 3637013a63252b8fb9423caec12636e937286748 | |
parent | Revert "include sysmacros.h where used" (diff) | |
download | kernel-qcow2-util-linux-075d2c0754f3723a68ad61755709fa2f0af604b4.tar.gz kernel-qcow2-util-linux-075d2c0754f3723a68ad61755709fa2f0af604b4.tar.xz kernel-qcow2-util-linux-075d2c0754f3723a68ad61755709fa2f0af604b4.zip |
include: move sys/sysmacros.h to c.h
The file is no portable (#ifdef HAVE_SYS_SYSMACROS_H is necessary),
but needed on many places. It seems better to keep it in c.h.
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | disk-utils/fsck.cramfs.c | 5 | ||||
-rw-r--r-- | disk-utils/raw.c | 3 | ||||
-rw-r--r-- | include/c.h | 4 | ||||
-rw-r--r-- | lib/loopdev.c | 1 | ||||
-rw-r--r-- | login-utils/login.c | 3 |
5 files changed, 5 insertions, 11 deletions
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index d3088a5ab..ef311c103 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -49,14 +49,11 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> -#ifdef HAVE_SYS_SYSMACROS_H -#include <sys/sysmacros.h> /* for major, minor */ -#endif +#include "c.h" #include "cramfs.h" #include "nls.h" #include "blkdev.h" -#include "c.h" #include "exitcodes.h" #include "strutils.h" #include "closestream.h" diff --git a/disk-utils/raw.c b/disk-utils/raw.c index 6c4b6de8e..b8dbe72fa 100644 --- a/disk-utils/raw.c +++ b/disk-utils/raw.c @@ -20,9 +20,6 @@ #include <string.h> #include <sys/ioctl.h> #include <sys/stat.h> -#ifdef HAVE_SYS_SYSMACROS_H -#include <sys/sysmacros.h> -#endif #include <unistd.h> #include "c.h" diff --git a/include/c.h b/include/c.h index aec34394d..08dab934a 100644 --- a/include/c.h +++ b/include/c.h @@ -21,6 +21,10 @@ # include <err.h> #endif +#ifdef HAVE_SYS_SYSMACROS_H +# include <sys/sysmacros.h> /* for major, minor */ +#endif + /* * Compiler-specific stuff */ diff --git a/lib/loopdev.c b/lib/loopdev.c index b2c8b987b..9ae61daa9 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -29,7 +29,6 @@ #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/mman.h> -#include <sys/sysmacros.h> #include <inttypes.h> #include <dirent.h> #include <linux/posix_types.h> diff --git a/login-utils/login.c b/login-utils/login.c index 236da9b3d..64326937a 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -48,9 +48,6 @@ #include <utmp.h> #include <stdlib.h> #include <sys/syslog.h> -#ifdef HAVE_SYS_SYSMACROS_H -#include <sys/sysmacros.h> -#endif #ifdef HAVE_LINUX_MAJOR_H # include <linux/major.h> #endif |