Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
Matthew Bauer
2018-05-08 09:36:00 -05:00
317 changed files with 7440 additions and 6298 deletions
@@ -135,7 +135,7 @@ stdenv.mkDerivation rec {
postInstall =
if stdenv.isx86_64 then ''makeWrapper $out/bin/qemu-system-x86_64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isi686 then ''makeWrapper $out/bin/qemu-system-i386 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isAarch32 then ''makeWrapper $out/bin/qemu-system-arm $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isAarch32 then ''makeWrapper $out/bin/qemu-system-arm $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isAarch64 then ''makeWrapper $out/bin/qemu-system-aarch64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else "";
@@ -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|' \
@@ -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)