]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
- build fixes for kernel 4.15 auto/th/VirtualBox-5.2.6-2
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 29 Jan 2018 23:19:59 +0000 (00:19 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 29 Jan 2018 23:19:59 +0000 (00:19 +0100)
- rel 2

VirtualBox.spec
kernel-4.15.patch [new file with mode: 0644]

index 7a7a9dbf38b36a457f3bca97dc233775867a9789..d3693caa99d6e95e3f4e41dfc57c82cedc5318b3 100644 (file)
@@ -42,7 +42,7 @@ exit 1
 
 %define                qtver   5.6.0
 
-%define                rel             1
+%define                rel             2
 %define                pname           VirtualBox
 Summary:       VirtualBox - x86 hardware virtualizer
 Summary(pl.UTF-8):     VirtualBox - wirtualizator sprzętu x86
@@ -82,6 +82,7 @@ Patch14:      %{pname}-multipython.patch
 Patch15:       %{pname}-lightdm-1.19.2.patch
 Patch16:       %{pname}-no-vboxvideo.patch
 Patch17:       %{pname}-kerndir.patch
+Patch18:       kernel-4.15.patch
 URL:           http://www.virtualbox.org/
 %if %{with userspace}
 %ifarch %{x8664}
@@ -567,6 +568,7 @@ tar -zxf guest-modules.tar.gz -C GuestDrivers
 
 ../src/VBox/HostDrivers/linux/export_modules.sh host-modules.tar.gz --without-hardening
 tar -zxf host-modules.tar.gz -C HostDrivers
+%patch18 -p1
 cd -
 %endif
 
diff --git a/kernel-4.15.patch b/kernel-4.15.patch
new file mode 100644 (file)
index 0000000..7edd0df
--- /dev/null
@@ -0,0 +1,101 @@
+--- VirtualBox-5.2.6/GuestDrivers/vboxguest/VBoxGuest-linux.c  2018-01-15 14:49:51.000000000 +0000
++++ VirtualBox-5.2.6/GuestDrivers/vboxguest/VBoxGuest-linux.c  2018-01-18 11:31:11.000000000 +0000
+@@ -39,6 +39,12 @@
+ # define VBOXGUEST_WITH_INPUT_DRIVER
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++# define CONST_4_15 const
++#else
++# define CONST_4_15
++#endif
++
+ #include "VBoxGuestInternal.h"
+ #ifdef VBOXGUEST_WITH_INPUT_DRIVER
+ # include <linux/input.h>
+@@ -1058,7 +1064,7 @@ void VGDrvNativeISRMousePollEvent(PVBOXG
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+ /** log and dbg_log parameter setter. */
+-static int vgdrvLinuxParamLogGrpSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogGrpSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
+ {
+     if (g_fLoggerCreated)
+     {
+@@ -1073,7 +1079,7 @@ static int vgdrvLinuxParamLogGrpSet(cons
+ }
+ /** log and dbg_log parameter getter. */
+-static int vgdrvLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogGrpGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
+ {
+     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+     *pszBuf = '\0';
+@@ -1084,7 +1090,7 @@ static int vgdrvLinuxParamLogGrpGet(char
+ /** log and dbg_log_flags parameter setter. */
+-static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
+ {
+     if (g_fLoggerCreated)
+     {
+@@ -1098,7 +1104,7 @@ static int vgdrvLinuxParamLogFlagsSet(co
+ }
+ /** log and dbg_log_flags parameter getter. */
+-static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
+ {
+     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+     *pszBuf = '\0';
+@@ -1109,7 +1115,7 @@ static int vgdrvLinuxParamLogFlagsGet(ch
+ /** log and dbg_log_dest parameter setter. */
+-static int vgdrvLinuxParamLogDstSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogDstSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
+ {
+     if (g_fLoggerCreated)
+     {
+@@ -1123,7 +1129,7 @@ static int vgdrvLinuxParamLogDstSet(cons
+ }
+ /** log and dbg_log_dest parameter getter. */
+-static int vgdrvLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogDstGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
+ {
+     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+     *pszBuf = '\0';
+@@ -1134,7 +1140,7 @@ static int vgdrvLinuxParamLogDstGet(char
+ /** r3_log_to_host parameter setter. */
+-static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
+ {
+     if (    pszValue == NULL
+         || *pszValue == '\0'
+@@ -1152,7 +1158,7 @@ static int vgdrvLinuxParamR3LogToHostSet
+ }
+ /** r3_log_to_host parameter getter. */
+-static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
+ {
+     strcpy(pszBuf, g_DevExt.fLoggingEnabled ? "enabled" : "disabled");
+     return strlen(pszBuf);
+--- VirtualBox-5.2.6/GuestDrivers/vboxvideo/vbox_mode.c        2018-01-17 02:48:28.000000000 +0000
++++ VirtualBox-5.2.6/GuestDrivers/vboxvideo/vbox_mode.c        2018-01-18 11:31:11.000000000 +0000
+@@ -396,7 +397,11 @@ static struct drm_encoder *vbox_best_sin
+       /* pick the encoder ids */
+       if (enc_id)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++              return drm_encoder_find(connector->dev, NULL, enc_id);
++#else
+               return drm_encoder_find(connector->dev, enc_id);
++#endif
+       return NULL;
+ }
This page took 0.115179 seconds and 4 git commands to generate.