From: Ferruh Yigit Date: Wed, 15 Jun 2016 15:57:42 +0000 (+0100) Subject: igb_uio: fix build on CentOS 6.8 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a7aeb6c658cecc04c903c88e5eeaea90c6d56f39;p=dpdk.git igb_uio: fix build on CentOS 6.8 Following compile error observed with CentOS 6.8, which uses kernel kernel-devel-2.6.32-642.el6.x86_64: In function 'igbuio_msix_mask_irq': error: 'PCI_MSIX_ENTRY_CTRL_MASKBIT' undeclared Reported-by: Thiago Martins Signed-off-by: Ferruh Yigit --- diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h index c1d45a661d..0d781e4825 100644 --- a/lib/librte_eal/linuxapp/igb_uio/compat.h +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h @@ -24,6 +24,15 @@ #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 #endif +/* + * for kernels < 2.6.38 and backported patch that moves MSI-X entry definition + * to pci_regs.h Those kernels has PCI_MSIX_ENTRY_SIZE defined but not + * PCI_MSIX_ENTRY_CTRL_MASKBIT + */ +#ifndef PCI_MSIX_ENTRY_CTRL_MASKBIT +#define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) && \ (!(defined(RHEL_RELEASE_CODE) && \ RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5, 9)))