mirror of
https://github.com/gryf/gryf-overlay.git
synced 2026-04-24 13:01:25 +02:00
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.
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user