diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-05-07 04:29:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 04:29:25 +0000 |
commit | 52dac0889d4ba045385bfa47056d9ef1ff1a139f (patch) | |
tree | 9177674184ff878e42143346d77d2d5df73601d7 | |
parent | e71c44160ba7d2b73c668a53f5600dbc1901cbc2 (diff) | |
parent | d25607c79db9fca7f1c8696b792e376b42fb2ecb (diff) | |
download | nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar.gz nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar.bz2 nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar.lz nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar.xz nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.tar.zst nixlib-52dac0889d4ba045385bfa47056d9ef1ff1a139f.zip |
Merge pull request #39989 from plumelo/feature/virtualbox-kernel-4.17-patch
virtualbox: fix pci_get_bus_and_slot removed in kernel 4.17
-rw-r--r-- | pkgs/applications/virtualization/virtualbox/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/virtualization/virtualbox/kernpcidev.patch | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index ca0520f32a8f..d09a30f98a74 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -94,9 +94,7 @@ in stdenv.mkDerivation { patches = optional enableHardening ./hardened.patch - ++ [ ./qtx11extras.patch ]; - - + ++ [ ./qtx11extras.patch ./kernpcidev.patch ]; postPatch = '' sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \ diff --git a/pkgs/applications/virtualization/virtualbox/kernpcidev.patch b/pkgs/applications/virtualization/virtualbox/kernpcidev.patch new file mode 100644 index 000000000000..5192227d7d01 --- /dev/null +++ b/pkgs/applications/virtualization/virtualbox/kernpcidev.patch @@ -0,0 +1,18 @@ +diff --git a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c +index b8019f7..b7d2e39 100644 +--- a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c ++++ b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c +@@ -73,8 +73,11 @@ MODULE_LICENSE("GPL"); + MODULE_VERSION(VBOX_VERSION_STRING); + #endif + +- +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) ++# 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_domain_bus_and_slot(0, bus, devfn) ++#elif 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) |