summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure20
-rw-r--r--engines/io_uring.c1
-rw-r--r--lib/types.h4
-rw-r--r--t/io_uring.c1
4 files changed, 26 insertions, 0 deletions
diff --git a/configure b/configure
index 1f4e50b1..c4fffd99 100755
--- a/configure
+++ b/configure
@@ -2295,6 +2295,23 @@ if compile_prog "" "-lcunit" "CUnit"; then
fi
print_config "CUnit" "$cunit"
+##########################################
+# check for __kernel_rwf_t
+__kernel_rwf_t="no"
+cat > $TMPC << EOF
+#include <linux/fs.h>
+int main(int argc, char **argv)
+{
+ __kernel_rwf_t x;
+ x = 0;
+ return x;
+}
+EOF
+if compile_prog "" "" "__kernel_rwf_t"; then
+ __kernel_rwf_t="yes"
+fi
+print_config "__kernel_rwf_t" "$__kernel_rwf_t"
+
#############################################################################
if test "$wordsize" = "64" ; then
@@ -2563,6 +2580,9 @@ fi
if test "$cunit" = "yes" ; then
output_sym "CONFIG_HAVE_CUNIT"
fi
+if test "$__kernel_rwf_t" = "yes"; then
+ output_sym "CONFIG_HAVE_KERNEL_RWF_T"
+fi
echo "LIBS+=$LIBS" >> $config_host_mak
echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak
diff --git a/engines/io_uring.c b/engines/io_uring.c
index 15a4d475..e051086b 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -20,6 +20,7 @@
#ifdef ARCH_HAVE_IOURING
+#include "../lib/types.h"
#include "../os/io_uring.h"
struct io_sq_ring {
diff --git a/lib/types.h b/lib/types.h
index 236bf8a3..d92b064c 100644
--- a/lib/types.h
+++ b/lib/types.h
@@ -13,4 +13,8 @@ typedef int bool;
#include <stdbool.h> /* IWYU pragma: export */
#endif
+#if !defined(CONFIG_HAVE_KERNEL_RWF_T)
+typedef int __kernel_rwf_t;
+#endif
+
#endif
diff --git a/t/io_uring.c b/t/io_uring.c
index 4efc015d..64055360 100644
--- a/t/io_uring.c
+++ b/t/io_uring.c
@@ -21,6 +21,7 @@
#include <sched.h>
#include "../arch/arch.h"
+#include "../lib/types.h"
#include "../os/io_uring.h"
#define barrier() __asm__ __volatile__("": : :"memory")