1
0
forked from pool/virtualbox

- Fix API changes for kernel 5.1.0 - add file "fixes_for_5.1.patch".

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=473
This commit is contained in:
Larry Finger 2019-03-20 19:32:50 +00:00 committed by Git OBS Bridge
parent c5353cacf0
commit 0613a84ab5
3 changed files with 51 additions and 0 deletions

42
fixes_for_5.1.patch Normal file
View File

@ -0,0 +1,42 @@
Index: VirtualBox-6.0.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- VirtualBox-6.0.4.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ VirtualBox-6.0.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -38,6 +38,9 @@
#include <iprt/process.h>
#include <iprt/string.h>
#include "internal/memobj.h"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
+#include <uapi/linux/mman.h>
+#endif
/*********************************************************************************************************************************
Index: VirtualBox-6.0.4/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
===================================================================
--- VirtualBox-6.0.4.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+++ VirtualBox-6.0.4/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
@@ -372,7 +372,7 @@ static int vboxPciFileWrite(struct file*
mm_segment_t fs_save;
fs_save = get_fs();
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
ret = kernel_write(file, data, size, &offset);
#else
Index: VirtualBox-6.0.4/src/VBox/Additions/linux/sharedfolders/regops.c
===================================================================
--- VirtualBox-6.0.4.orig/src/VBox/Additions/linux/sharedfolders/regops.c
+++ VirtualBox-6.0.4/src/VBox/Additions/linux/sharedfolders/regops.c
@@ -588,7 +588,9 @@ static int sf_reg_release(struct inode *
return 0;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
+static vm_fault_t sf_reg_fault(struct vm_fault *vmf)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
static int sf_reg_fault(struct vm_fault *vmf)
#elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Mar 20 19:31:19 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>
- Fix API changes for kernel 5.1.0 - add file "fixes_for_5.1.patch".
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 20 16:31:23 UTC 2019 - Larry Finger <Larry.Finger@gmail.com> Wed Feb 20 16:31:23 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -133,6 +133,9 @@ Patch126: fixes_for_5.0.patch
Patch128: fix_lib_search.patch Patch128: fix_lib_search.patch
# Fixes for modified kernel in Leap 15.1 # Fixes for modified kernel in Leap 15.1
Patch129: fixes_for_Leap15.1.patch Patch129: fixes_for_Leap15.1.patch
# Fixes for kernel 5.1
Patch130: fixes_for_5.1.patch
#endif
# #
BuildRequires: LibVNCServer-devel BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel BuildRequires: SDL-devel
@ -434,6 +437,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
%patch126 -p1 %patch126 -p1
%patch128 -p1 %patch128 -p1
%patch129 -p1 %patch129 -p1
%patch130 -p1
#copy user manual #copy user manual
cp %{SOURCE1} UserManual.pdf cp %{SOURCE1} UserManual.pdf