28 lines
990 B
Diff
28 lines
990 B
Diff
diff -Naru 1/vboxsf/utils.c 2/vboxsf/utils.c
|
|
--- 1/vboxsf/utils.c 2018-08-13 21:58:52.000000000 +0700
|
|
+++ 2/vboxsf/utils.c 2018-08-13 22:06:59.623300208 +0700
|
|
@@ -50,7 +50,11 @@
|
|
RTTimeSpecSetNano(ts, t);
|
|
}
|
|
#else /* >= 2.6.0 */
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0))
|
|
static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
|
|
+#else
|
|
+static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
|
|
+#endif //(LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0))
|
|
{
|
|
int64_t t = RTTimeSpecGetNano(ts);
|
|
int64_t nsec;
|
|
@@ -60,7 +64,11 @@
|
|
tv->tv_nsec = nsec;
|
|
}
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0))
|
|
static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
|
|
+#else
|
|
+static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec64 *tv)
|
|
+#endif //(LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0))
|
|
{
|
|
int64_t t = (int64_t)tv->tv_nsec + (int64_t)tv->tv_sec * 1000000000;
|
|
RTTimeSpecSetNano(ts, t);
|