diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h index e2731c7..f4a6703 100644 --- a/libinstaller/linuxioctl.h +++ b/libinstaller/linuxioctl.h @@ -16,7 +16,20 @@ #include /* Floppy geometry */ #include /* Hard disk geometry */ -#include /* FIGETBSZ, FIBMAP, FS_IOC_* */ +// #include /* FIGETBSZ, FIBMAP, FS_IOC_* */ +// linux/fs.h unfortunately causes conflict with sys/mount.h since glibc-2.36 +// https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E +// add the necessary definitions + +#define FS_IOC_GETFLAGS _IOR('f', 1, long) +#define FS_IOC_SETFLAGS _IOW('f', 2, long) +#define FIBMAP _IO(0x00,1) /* bmap access */ +#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ +#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */ +#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ + +// for musl we also need limits.h for PATH_MAX +#include #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */ #undef SECTOR_BITS