[kdbus] New functions as wrappers of their 3.10 counterparts
authorMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 17 Apr 2015 13:55:55 +0000 (15:55 +0200)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 17 Apr 2015 14:29:56 +0000 (16:29 +0200)
Change-Id: I78aa8e359bd840049d6098b683e138898724aa95
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
compat/include/linux/time64.h [new file with mode: 0644]
compat/include/linux/uio.h

diff --git a/compat/include/linux/time64.h b/compat/include/linux/time64.h
new file mode 100644 (file)
index 0000000..745bccb
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef _LINUX_TIME64_H
+#define _LINUX_TIME64_H
+
+#include <linux/time.h>
+#include <linux/ktime.h>
+
+/* 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 */
index 7188029..b691aa5 100644 (file)
@@ -12,6 +12,9 @@
 #include <linux/kernel.h>
 #include <uapi/linux/uio.h>
 
+/* other compatibility headers */
+#include <linux/time64.h>
+
 struct page;
 
 struct kvec {