diff --git a/fixes_for_5.1.patch b/fixes_for_5.1.patch new file mode 100644 index 0000000..d15034d --- /dev/null +++ b/fixes_for_5.1.patch @@ -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 + #include + #include "internal/memobj.h" ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) ++#include ++#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) diff --git a/virtualbox.changes b/virtualbox.changes index 4cf8f14..def803a 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 20 19:31:19 UTC 2019 - Larry Finger + +- 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 diff --git a/virtualbox.spec b/virtualbox.spec index 2fb9c3c..06a91fb 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -133,6 +133,9 @@ Patch126: fixes_for_5.0.patch Patch128: fix_lib_search.patch # Fixes for modified kernel in Leap 15.1 Patch129: fixes_for_Leap15.1.patch +# Fixes for kernel 5.1 +Patch130: fixes_for_5.1.patch +#endif # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -434,6 +437,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %patch126 -p1 %patch128 -p1 %patch129 -p1 +%patch130 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf