From 6cf21dbb265781f320c06968ce0cc7a0fda6c964 Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Fri, 17 Apr 2015 15:55:55 +0200 Subject: [kdbus] New functions as wrappers of their 3.10 counterparts Change-Id: I78aa8e359bd840049d6098b683e138898724aa95 Signed-off-by: Maciej Wereski --- compat/include/linux/time64.h | 23 +++++++++++++++++++++++ compat/include/linux/uio.h | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 compat/include/linux/time64.h diff --git a/compat/include/linux/time64.h b/compat/include/linux/time64.h new file mode 100644 index 00000000000..745bccbdb71 --- /dev/null +++ b/compat/include/linux/time64.h @@ -0,0 +1,23 @@ +#ifndef _LINUX_TIME64_H +#define _LINUX_TIME64_H + +#include +#include + +/* copied from struct timespec */ +struct timespec64 { + __kernel_time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; + +static inline void ktime_get_ts64(struct timespec64 *ts) +{ + ktime_get_ts((struct timespec *)ts); +} + +static inline s64 timespec64_to_ns(const struct timespec64 *ts) +{ + return (s64) timespec_to_ns((struct timespec *)ts); +} + +#endif /* _LINUX_TIME64_H */ diff --git a/compat/include/linux/uio.h b/compat/include/linux/uio.h index 71880299ed4..b691aa5fa9c 100644 --- a/compat/include/linux/uio.h +++ b/compat/include/linux/uio.h @@ -12,6 +12,9 @@ #include #include +/* other compatibility headers */ +#include + struct page; struct kvec { -- cgit v1.2.3