vfio: fix build with Linux < 4.0
[dpdk.git] / drivers / bus / pci / pci_common.c
index 5085c34..4b3749a 100644 (file)
@@ -444,6 +444,7 @@ pci_hot_unplug_handler(struct rte_device *dev)
                return -1;
 
        switch (pdev->kdrv) {
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
        case RTE_KDRV_VFIO:
                /*
                 * vfio kernel module guaranty the pci device would not be
@@ -454,6 +455,7 @@ pci_hot_unplug_handler(struct rte_device *dev)
                rte_dev_event_callback_process(dev->name,
                                               RTE_DEV_EVENT_REMOVE);
                break;
+#endif
        case RTE_KDRV_IGB_UIO:
        case RTE_KDRV_UIO_GENERIC:
        case RTE_KDRV_NIC_UIO: