commit:     148d258205d9dac8c75d6b5ae041e6a96de5b075
Author:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 27 14:02:30 2017 +0000
Commit:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Mon Nov 27 23:00:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=148d2582

app-emulation/virtualbox-modules: support linux 4.14.x, fix bug #636484

SKB_GSO_UDP has been removed in linux by commit
d9d30adf56777c402c0027c0e6ae21f17cc0a365.

Reported-by: Fabio Rossi <rossi.f <AT> inwind.it>
Suggested-by: Herb Miller Jr. <herb <AT> hlmjr.com>

Closes: https://bugs.gentoo.org/636484

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 app-emulation/virtualbox-modules/Manifest          |  2 +-
 .../files/virtualbox-modules-5.1.30-udp.patch      | 35 ++++++++++++++++++++++
 .../virtualbox-modules-5.1.30.ebuild               |  4 +++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/app-emulation/virtualbox-modules/Manifest 
b/app-emulation/virtualbox-modules/Manifest
index 3832b270b67..b601fb3ae1a 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,3 @@
 DIST vbox-kernel-module-src-5.1.26.tar.xz 625384 SHA256 
5ba4f728c5b62c3d93828d99c5b54b8fb24a16bc8674e704714c4f71eb95ddc4 SHA512 
c77e0d8dfade2abac95162e7e7a424be4875e44d43bcf2a13e0e50caa69f5fd0d21c77f03bb2cd4cbd5df4ab31e9fbd49ecd9220a49af8cd10081b960e014010
 WHIRLPOOL 
519246aeae6637cb8eb4b841552dc5e63f9a3d761fa6bcec43601c8a3194264457e4e78d200e975e31266af2944aa81f7487cf389f43d93db08f60a700a7758e
 DIST vbox-kernel-module-src-5.1.28.tar.xz 625464 SHA256 
d6f3b7afa98d2b526d8da3c8906addc307eea069db371d012ebbffc1ccdf9dd2 SHA512 
c8ae6c065ad42e57eee9a54f288ba60fd9b32efe18cb74c8a035d547b30e7d857c9091307485a8dfc77eec45de29d3217c6871140e167e2438759c314c47680a
 WHIRLPOOL 
c6508d63cacfcd3ac901f276cd793dc83c595bc73965518baa544b5cf5157ea52363b759f03586f743d6c2e0fda7252b98136c96cef28ecfb31f6915d4ce5709
-DIST vbox-kernel-module-src-5.1.30.tar.xz 625424 SHA256 
879b1bc45b9f1a3fd929d2fd2e67dcaffe4074839f6364bf0e64618bfe2b3b2e SHA512 
8e2113584e63e2ace71b708dc77428fd09167a1bded12b47312a5a8f85ef448e17f76b4300dba4c8ec99d7f8cb278cef039c6282c676e35b8f200bafb5c4770a
 WHIRLPOOL 
aa6fc3a0516514c2ca0c39ea28200559582fdd648e96084a5ca1daabfd1f478312199576ad27336eba124b443fbe122364efde2c60ca3386872cd1274333f4df
+DIST vbox-kernel-module-src-5.1.30.tar.xz 625424 BLAKE2B 
00d33cad237af1f0d5b4dbea38f84e0327d10d97fc309a8c7536433cb4fddf3614e6de160646077040b4fdc6dd126cfa2250081084ca0243cc572d9f5e9d5dfd
 SHA512 
8e2113584e63e2ace71b708dc77428fd09167a1bded12b47312a5a8f85ef448e17f76b4300dba4c8ec99d7f8cb278cef039c6282c676e35b8f200bafb5c4770a

diff --git 
a/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.30-udp.patch 
b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.30-udp.patch
new file mode 100644
index 00000000000..b9f695e49a1
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.30-udp.patch
@@ -0,0 +1,35 @@
+diff --git a/work/vboxnetflt/linux/VBoxNetFlt-linux.c 
b/work/vboxnetflt/linux/VBoxNetFlt-linux.c
+index f824654..b61d82c 100644
+--- work/vboxnetflt/linux/VBoxNetFlt-linux.c
++++ work/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
+diff --git a/work/vboxpci/linux/VBoxPci-linux.c 
b/work/vboxpci/linux/VBoxPci-linux.c
+index 2dbf47f..e361ef3 100644
+--- work/vboxpci/linux/VBoxPci-linux.c
++++ work/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/app-emulation/virtualbox-modules/virtualbox-modules-5.1.30.ebuild 
b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.30.ebuild
index 6600e4fb53b..5a079275586 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.30.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.30.ebuild
@@ -47,6 +47,10 @@ src_prepare() {
                epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
        fi
 
+       if kernel_is -ge 4 14 0 ; then
+               epatch "${FILESDIR}"/${PN}-5.1.30-udp.patch
+       fi
+
        default
 }
 

Reply via email to