]> git.pld-linux.org Git - packages/VirtualBox.git/blame - kernel-4.18.patch
patch to fix build with kernel 4.18 from opensuse; rel 2
[packages/VirtualBox.git] / kernel-4.18.patch
CommitLineData
30dce754
JP
1Index: VirtualBox-5.2.12/src/VBox/Additions/linux/sharedfolders/utils.c
2===================================================================
3--- VirtualBox-5.2.12.orig/src/VBox/Additions/linux/sharedfolders/utils.c
4+++ VirtualBox-5.2.12/src/VBox/Additions/linux/sharedfolders/utils.c
5@@ -50,7 +50,11 @@ static void sf_timespec_from_ftime(RTTIM
6 RTTimeSpecSetNano(ts, t);
7 }
8 #else /* >= 2.6.0 */
9+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
10+static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
11+#else
12 static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
13+#endif
14 {
15 int64_t t = RTTimeSpecGetNano(ts);
16 int64_t nsec;
17@@ -60,7 +64,11 @@ static void sf_ftime_from_timespec(struc
18 tv->tv_nsec = nsec;
19 }
20
21+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
22+static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec64 *tv)
23+#else
24 static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
25+#endif
26 {
27 int64_t t = (int64_t)tv->tv_nsec + (int64_t)tv->tv_sec * 1000000000;
28 RTTimeSpecSetNano(ts, t);
29
This page took 0.090333 seconds and 4 git commands to generate.