virtualbox-ose-dkms: fix build on linux4.14

Closes: #9794 [via git-merge-pr]
This commit is contained in:
Renato Aguiar 2017-12-05 11:07:42 -08:00 committed by Jürgen Buchmüller
parent d708b70e9f
commit 98084957c2
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,31 @@
--- src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+++ src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
@@ -126,6 +126,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOXNETFLTNOTIFIER;
# endif
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#define SKB_GSO_UDP 0
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
# define VBOX_HAVE_SKB_VLAN
#else
--- src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+++ src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
@@ -353,12 +353,16 @@ static void vboxPciFileClose(struct file* file)
static int vboxPciFileWrite(struct file* file, unsigned long long offset, unsigned char* data, unsigned int size)
{
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+ ret = kernel_write(file, data, size, &offset);
+#else
mm_segment_t fs_save;
fs_save = get_fs();
set_fs(get_ds());
ret = vfs_write(file, data, size, &offset);
set_fs(fs_save);
+#endif
if (ret < 0)
printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret);

View file

@ -1,7 +1,7 @@
# Template file for 'virtualbox-ose'
pkgname=virtualbox-ose
version=5.1.28
revision=1
revision=2
wrksrc="VirtualBox-${version%*a}"
short_desc="General-purpose full virtualizer for x86 hardware"
maintainer="Juan RP <xtraeme@voidlinux.eu>"