1
0
forked from pool/virtualbox
virtualbox/fixes_for_5.1.patch

43 lines
1.9 KiB
Diff

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)