summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-15 11:14:43 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-15 11:19:16 -0700
commitf16b83b29349dae16f07aae9a1709aed0dff247d (patch)
tree6bdeb2fd6d7a7572ec974638acfd5d4f387aaba5 /src
parent89167b457f5678fd8fae0696d616cef5e3a3c379 (diff)
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 <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r--src/compat.h8
-rw-r--r--src/io_uring.c1
-rw-r--r--src/liburing.h1
-rw-r--r--src/syscall.c1
4 files changed, 11 insertions, 0 deletions
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 <errno.h>
#include <string.h>
+#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 <sys/uio.h>
+#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 <unistd.h>
#include <sys/syscall.h>
#include <sys/uio.h>
+#include "compat.h"
#include "io_uring.h"
#if defined(__x86_64)