summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Teran <evan.teran@gmail.com>2016-03-16 22:03:05 -0400
committerEvan Teran <evan.teran@gmail.com>2016-03-16 22:03:05 -0400
commit1f0fe410a387b4dfeb5b8633576023135ca9ddc4 (patch)
tree057aff6554223f055163f8acd17d47e8ebcbdd61
parentapp-emulation/vmware-modules: (diff)
downloadvmware-1f0fe410a387b4dfeb5b8633576023135ca9ddc4.tar.gz
vmware-1f0fe410a387b4dfeb5b8633576023135ca9ddc4.tar.bz2
vmware-1f0fe410a387b4dfeb5b8633576023135ca9ddc4.zip
app-emulation/vmware-modules:
compiles on 4.3 kernels :-) Package-Manager: portage-2.2.26
-rw-r--r--app-emulation/vmware-modules/files/304-4.3-00-misc_deregister.patch34
-rw-r--r--app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild (renamed from app-emulation/vmware-modules/vmware-modules-304.3.ebuild)1
2 files changed, 35 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.3-00-misc_deregister.patch b/app-emulation/vmware-modules/files/304-4.3-00-misc_deregister.patch
new file mode 100644
index 0000000..32d960d
--- /dev/null
+++ b/app-emulation/vmware-modules/files/304-4.3-00-misc_deregister.patch
@@ -0,0 +1,34 @@
+diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c
+--- vmci-only/linux/driver.c 2016-03-16 21:59:30.229062702 -0400
++++ vmci-only.new/linux/driver.c 2016-03-16 21:58:35.452061974 -0400
+@@ -2469,7 +2469,9 @@ vmci_init(void)
+ static void __exit
+ vmci_exit(void)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
+ int retval;
++#endif
+
+ if (guestDeviceInit) {
+ pci_unregister_driver(&vmci_driver);
+
+diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c
+--- vmci-only/linux/driver.c 2016-03-16 21:53:24.184057841 -0400
++++ vmci-only.new/linux/driver.c 2016-03-16 21:54:37.558058816 -0400
+@@ -2482,12 +2482,16 @@ vmci_exit(void)
+
+ VMCI_HostCleanup();
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++ misc_deregister(&linuxState.misc);
++#else
+ retval = misc_deregister(&linuxState.misc);
+ if (retval) {
+ Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);
+ } else {
+ Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
+ }
++#endif
+
+ hostDeviceInit = FALSE;
+ }
diff --git a/app-emulation/vmware-modules/vmware-modules-304.3.ebuild b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild
index a77203d..766eb32 100644
--- a/app-emulation/vmware-modules/vmware-modules-304.3.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild
@@ -99,6 +99,7 @@ src_prepare() {
kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-01-vmci_vmalloc.patch"
kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-02-vsock.patch"
kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-03-vsock.patch"
+ kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.3-00-misc_deregister.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user