From 98084957c29f5a381c7b89a5bf6ba89c41a032bc Mon Sep 17 00:00:00 2001 From: Renato Aguiar Date: Tue, 5 Dec 2017 11:07:42 -0800 Subject: [PATCH] virtualbox-ose-dkms: fix build on linux4.14 Closes: #9794 [via git-merge-pr] --- .../patches/010-kernel-4.14.patch | 31 +++++++++++++++++++ srcpkgs/virtualbox-ose/template | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/virtualbox-ose/patches/010-kernel-4.14.patch diff --git a/srcpkgs/virtualbox-ose/patches/010-kernel-4.14.patch b/srcpkgs/virtualbox-ose/patches/010-kernel-4.14.patch new file mode 100644 index 0000000000..58bd28db97 --- /dev/null +++ b/srcpkgs/virtualbox-ose/patches/010-kernel-4.14.patch @@ -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); diff --git a/srcpkgs/virtualbox-ose/template b/srcpkgs/virtualbox-ose/template index 15923b2f1e..55de112df8 100644 --- a/srcpkgs/virtualbox-ose/template +++ b/srcpkgs/virtualbox-ose/template @@ -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 "