Fix liburing include/compat for older kernels
This commit is contained in:
@@ -2,12 +2,26 @@
|
||||
#ifndef LIBURING_COMPAT_H
|
||||
#define LIBURING_COMPAT_H
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <linux/time_types.h>
|
||||
/* <linux/time_types.h> is included above and not needed again */
|
||||
#define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H 1
|
||||
|
||||
#include <linux/openat2.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
|
||||
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
#else
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#ifndef BLOCK_URING_CMD_DISCARD
|
||||
#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user