diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
commit | 8821237240c5374d83298b2da5ad88fa1e3c1ef7 (patch) | |
tree | e1bc03fa83c61165f48ffe3f528ac5496332872a /libinstaller/linuxioctl.h | |
parent | 38dcca25c8855c95649e3f0b5b09fae862ed5c7a (diff) | |
parent | 7307d60063ee4303da4de45f9d984fdc8df92146 (diff) | |
download | syslinux-8821237240c5374d83298b2da5ad88fa1e3c1ef7.tar.gz |
Merge remote-tracking branch 'remotes/upstream/master' into baserock/morph
Diffstat (limited to 'libinstaller/linuxioctl.h')
-rw-r--r-- | libinstaller/linuxioctl.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h index 7ef919a3..e2731c7c 100644 --- a/libinstaller/linuxioctl.h +++ b/libinstaller/linuxioctl.h @@ -9,22 +9,36 @@ #include <sys/ioctl.h> +#ifdef __linux__ + #define statfs _kernel_statfs /* HACK to deal with broken 2.4 distros */ #include <linux/fd.h> /* Floppy geometry */ #include <linux/hdreg.h> /* Hard disk geometry */ -#include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_FIEMAP */ -#include <linux/msdos_fs.h> /* FAT_IOCTL_SET_ATTRIBUTES */ +#include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */ #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */ #undef SECTOR_BITS -#include <linux/ext2_fs.h> /* EXT2_IOC_* */ + +#ifndef FS_IOC_GETFLAGS +/* Old kernel headers, these were once ext2-specific... */ +# include <linux/ext2_fs.h> /* EXT2_IOC_* */ + +# define FS_IOC_GETFLAGS EXT2_IOC_GETFLAGS +# define FS_IOC_SETFLAGS EXT2_IOC_SETFLAGS + +# define FS_IMMUTABLE_FL EXT2_IMMUTABLE_FL + +#else + +# include <ext2fs/ext2_fs.h> + +#endif #ifndef FAT_IOCTL_GET_ATTRIBUTES # define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) #endif - #ifndef FAT_IOCTL_SET_ATTRIBUTES # define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) #endif @@ -37,11 +51,13 @@ #undef statfs -#if defined(__linux__) && !defined(BLKGETSIZE64) +#ifndef BLKGETSIZE64 /* This takes a u64, but the size field says size_t. Someone screwed big. */ # define BLKGETSIZE64 _IOR(0x12,114,size_t) #endif #include <linux/loop.h> +#endif /* __linux__ */ + #endif /* LIBINSTALLER_LINUXIOCTL_H */ |