1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-01-06 13:54:23 +01:00
Files
gryf-overlay/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-5.2.18-linux-4.18.patch
gryf 5cdd66dd7c Make virtualbox-guest-additions to compile
Currently official build for guest additions will fail due to some
unset/wrong set variables. This is an workaround for it - added KERN_VER
variable which is set to current kernel version, so this ebuild cannot
be run against new kernel version while executed on older/other kernel
version.
2018-11-25 09:10:20 +01:00

30 lines
1.0 KiB
Diff

Author: Larry Finger
Origin: https://www.mail-archive.com/vbox-dev@virtualbox.org/msg09363.html
--- a/src/VBox/Additions/linux/sharedfolders/utils.c
+++ b/src/VBox/Additions/linux/sharedfolders/utils.c
@@ -50,7 +50,11 @@ static void sf_timespec_from_ftime(RTTIMESPEC *ts, time_t *time)
RTTimeSpecSetNano(ts, t);
}
#else /* >= 2.6.0 */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
+static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
+#else
static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
+#endif
{
int64_t t = RTTimeSpecGetNano(ts);
int64_t nsec;
@@ -60,7 +64,11 @@ static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
tv->tv_nsec = nsec;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
+static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec64 *tv)
+#else
static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
+#endif
{
int64_t t = (int64_t)tv->tv_nsec + (int64_t)tv->tv_sec * 1000000000;
RTTimeSpecSetNano(ts, t);