libinstaller: Use SOURCE_DATE_EPOCH for synthesized modification time stamps
[syslinux.git] / libinstaller / linuxioctl.h
blobe2731c7c21fe68f00339f2859d5993b6f59623ec
1 /*
2 * linuxioctl.h
4 * Wrapper for Linux ioctl definitions, including workarounds
5 */
7 #ifndef LIBINSTALLER_LINUXIOCTL_H
8 #define LIBINSTALLER_LINUXIOCTL_H
10 #include <sys/ioctl.h>
12 #ifdef __linux__
14 #define statfs _kernel_statfs /* HACK to deal with broken 2.4 distros */
16 #include <linux/fd.h> /* Floppy geometry */
17 #include <linux/hdreg.h> /* Hard disk geometry */
19 #include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */
21 #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */
22 #undef SECTOR_BITS
24 #ifndef FS_IOC_GETFLAGS
25 /* Old kernel headers, these were once ext2-specific... */
26 # include <linux/ext2_fs.h> /* EXT2_IOC_* */
28 # define FS_IOC_GETFLAGS EXT2_IOC_GETFLAGS
29 # define FS_IOC_SETFLAGS EXT2_IOC_SETFLAGS
31 # define FS_IMMUTABLE_FL EXT2_IMMUTABLE_FL
33 #else
35 # include <ext2fs/ext2_fs.h>
37 #endif
39 #ifndef FAT_IOCTL_GET_ATTRIBUTES
40 # define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
41 #endif
42 #ifndef FAT_IOCTL_SET_ATTRIBUTES
43 # define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
44 #endif
46 #include <linux/fiemap.h> /* FIEMAP definitions */
48 #ifndef FS_IOC_FIEMAP
49 # define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
50 #endif
52 #undef statfs
54 #ifndef BLKGETSIZE64
55 /* This takes a u64, but the size field says size_t. Someone screwed big. */
56 # define BLKGETSIZE64 _IOR(0x12,114,size_t)
57 #endif
59 #include <linux/loop.h>
61 #endif /* __linux__ */
63 #endif /* LIBINSTALLER_LINUXIOCTL_H */