diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-11-28 10:40:32 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2007-11-28 10:41:26 +0100 |
commit | e460a5bf893227ccd7cdc9b8e5beec1ebc30a858 (patch) | |
tree | 0a3e4f29b76835d95a4d890efd935b6a1fdb7297 /fdisk | |
parent | 7e5fad475258e0b77857011ebdccdcb045a4cd38 (diff) | |
download | util-linux-old-e460a5bf893227ccd7cdc9b8e5beec1ebc30a858.tar.gz |
build-sys: cleanup usage of linux/major.h
The utils like fdisk or login are usable on non-linux systems.
This patch allows to compile on systems without linux/major.h.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'fdisk')
-rw-r--r-- | fdisk/fdisksgilabel.c | 1 | ||||
-rw-r--r-- | fdisk/fdisksunlabel.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c index 5adf64e3..c970c7cf 100644 --- a/fdisk/fdisksgilabel.c +++ b/fdisk/fdisksgilabel.c @@ -22,7 +22,6 @@ #include <endian.h> #include "nls.h" -#include <linux/major.h> /* FLOPPY_MAJOR */ #include "blkdev.h" diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c index ff9a182d..4ed97330 100644 --- a/fdisk/fdisksunlabel.c +++ b/fdisk/fdisksunlabel.c @@ -27,7 +27,9 @@ #include <scsi/scsi.h> /* SCSI_IOCTL_GET_IDLUN */ #undef u_char #endif +#ifdef HAVE_LINUX_MAJOR_H #include <linux/major.h> /* FLOPPY_MAJOR */ +#endif #include "common.h" #include "fdisk.h" @@ -69,6 +71,9 @@ static inline __u32 __swap32(__u32 x) { #define SSWAP32(x) (other_endian ? __swap32(x) \ : (__u32)(x)) +#ifndef FLOPPY_MAJOR +#define FLOPPY_MAJOR 2 +#endif #ifndef IDE0_MAJOR #define IDE0_MAJOR 3 #endif |