summaryrefslogtreecommitdiff
path: root/src/include/liburing/compat.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-12 21:16:21 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-12 21:16:21 -0700
commitd0a15ca057fa3d256fd36978728d9d6daedbd919 (patch)
treec0c35c64ff2ad566104071ad766aa3951439b144 /src/include/liburing/compat.h
parente50243577946e152fed91133f78dd79c1e5c1141 (diff)
downloadliburing-d0a15ca057fa3d256fd36978728d9d6daedbd919.tar.gz
liburing-d0a15ca057fa3d256fd36978728d9d6daedbd919.tar.bz2
Correctly handle if __kernel_timespec is defined
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/include/liburing/compat.h')
-rw-r--r--src/include/liburing/compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/liburing/compat.h b/src/include/liburing/compat.h
index d10d7a8..7eaad41 100644
--- a/src/include/liburing/compat.h
+++ b/src/include/liburing/compat.h
@@ -6,4 +6,13 @@
typedef int __kernel_rwf_t;
#endif
+#if !defined(CONFIG_HAVE_KERNEL_TIMESPEC)
+struct __kernel_timespec {
+ int64_t tv_sec;
+ long long tv_nsec;
+};
+#else
+#include <linux/time_types.h>
+#endif
+
#endif