Last active
July 30, 2018 08:47
-
-
Save evilJazz/291796d2fd6fe32fe822dc1b3346dc95 to your computer and use it in GitHub Desktop.
Patch for VirtualBox 5.2.8/5.2.10 modules to compile against Linux Kernel 4.17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /original/VBoxPci-linux.c | |
+++ /patched/VBoxPci-linux.c | |
@@ -89,7 +89,11 @@ | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) | |
# define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p) | |
# define PCI_DEV_PUT(x) pci_dev_put(x) | |
-# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn) | |
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) | |
+ # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn) | |
+#else | |
+ # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn) | |
+#endif | |
#else | |
# define PCI_DEV_GET(v,d,p) pci_find_device(v,d,p) | |
# define PCI_DEV_PUT(x) do { } while (0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to apply them?