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>
This commit is contained in:
Jens Axboe
2019-01-15 11:14:43 -07:00
parent 89167b457f
commit f16b83b293
6 changed files with 152 additions and 0 deletions

8
src/compat.h Normal file
View File

@@ -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

View File

@@ -5,6 +5,7 @@
#include <errno.h>
#include <string.h>
#include "compat.h"
#include "io_uring.h"
#include "liburing.h"
#include "barrier.h"

View File

@@ -2,6 +2,7 @@
#define LIB_URING_H
#include <sys/uio.h>
#include "compat.h"
#include "io_uring.h"
/*

View File

@@ -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)