https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61955
Pierre Ossman <ossman at cendio dot se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ossman at cendio dot se --- Comment #4 from Pierre Ossman <ossman at cendio dot se> --- Unfortunately the git history doesn't go further back than 2.6.12 so I don't know when aio_abi.h got added. But the code only needs the enum, so something like this should work: #include <linux/version.h> /* aio_abi.h was added in 2.6.10 (FIXME: check this) */ #if LINUX_VERSION_CODE < 132624 enum { IOCB_CMD_PREAD = 0, IOCB_CMD_PWRITE = 1, IOCB_CMD_FSYNC = 2, IOCB_CMD_FDSYNC = 3, IOCB_CMD_NOOP = 6, }; #else #include_next <linux/aio_abi.h> #endif /* IOCB_CMD_PREADV/PWRITEV has been added in 2.6.19 */ #if LINUX_VERSION_CODE < 132627 #define IOCB_CMD_PREADV 7 #define IOCB_CMD_PWRITEV 8 #endif