From f16b83b29349dae16f07aae9a1709aed0dff247d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 15 Jan 2019 11:14:43 -0700 Subject: Add configure script Some older installs don't have __kernel_rwf_t in linux/fs.h, so add a check for that. Signed-off-by: Jens Axboe --- src/compat.h | 8 ++++++++ src/io_uring.c | 1 + src/liburing.h | 1 + src/syscall.c | 1 + 4 files changed, 11 insertions(+) create mode 100644 src/compat.h (limited to 'src') diff --git a/src/compat.h b/src/compat.h new file mode 100644 index 0000000..d322499 --- /dev/null +++ b/src/compat.h @@ -0,0 +1,8 @@ +#ifndef LIBURING_COMPAT_H +#define LIBURING_COMPAT_H + +#if !defined(CONFIG_HAVE_KERNEL_RWF_T) +typedef int __kernel_rwf_t; +#endif + +#endif diff --git a/src/io_uring.c b/src/io_uring.c index a75d135..7205914 100644 --- a/src/io_uring.c +++ b/src/io_uring.c @@ -5,6 +5,7 @@ #include #include +#include "compat.h" #include "io_uring.h" #include "liburing.h" #include "barrier.h" diff --git a/src/liburing.h b/src/liburing.h index fb07583..038dd15 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -2,6 +2,7 @@ #define LIB_URING_H #include +#include "compat.h" #include "io_uring.h" /* diff --git a/src/syscall.c b/src/syscall.c index a625b47..7097c46 100644 --- a/src/syscall.c +++ b/src/syscall.c @@ -4,6 +4,7 @@ #include #include #include +#include "compat.h" #include "io_uring.h" #if defined(__x86_64) -- cgit