diff options
Diffstat (limited to 'Makefile.d/pci_old_get_dev_test.c')
-rw-r--r-- | Makefile.d/pci_old_get_dev_test.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.d/pci_old_get_dev_test.c b/Makefile.d/pci_old_get_dev_test.c new file mode 100644 index 00000000..32236515 --- /dev/null +++ b/Makefile.d/pci_old_get_dev_test.c @@ -0,0 +1,17 @@ +/* Avoid a failing test due to libpci header symbol shadowing breakage */ +#define index shadow_workaround_index +#if !defined __NetBSD__ +#include <pci/pci.h> +#else +#include <pciutils/pci.h> +#endif +struct pci_access *pacc; +struct pci_dev *dev = {0}; +int main(int argc, char **argv) +{ + (void) argc; + (void) argv; + pacc = pci_alloc(); + dev = pci_get_dev(pacc, dev->bus, dev->dev, 1); + return 0; +} |