From d8116be5dd055bcb25c42885d2babdc831d0915a Mon Sep 17 00:00:00 2001 From: Ioannis Tsakpinis Date: Wed, 20 Nov 2024 19:53:52 +0200 Subject: [PATCH] build(core) add BLOCK_URING_CMD_DISCARD polyfill --- .../main/c/linux/liburing/include/liburing/compat.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/lwjgl/core/src/main/c/linux/liburing/include/liburing/compat.h b/modules/lwjgl/core/src/main/c/linux/liburing/include/liburing/compat.h index e9d61bbd5c..44fe4dc9bb 100644 --- a/modules/lwjgl/core/src/main/c/linux/liburing/include/liburing/compat.h +++ b/modules/lwjgl/core/src/main/c/linux/liburing/include/liburing/compat.h @@ -6,9 +6,7 @@ #include #include #include - -// LWJGL: skip include in io_uring.h -#define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H +#include typedef int __kernel_rwf_t; @@ -17,10 +15,17 @@ struct __kernel_timespec { long long tv_nsec; }; +/* is not available, so it can't be included */ +#define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H 1 + struct open_how { uint64_t flags; uint64_t mode; uint64_t resolve; }; +#ifndef BLOCK_URING_CMD_DISCARD +#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0) +#endif + #endif