From 88c871e74cb9d8b6f6f38747d1caae916364e2a2 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 2 Nov 2021 21:03:00 +0100 Subject: pci.h: move include into own wrapper Split the include of hwaccess and libpci. There is no need to have pci.h included in hwaccess. Change-Id: Ibf00356f0ef5cc92e0ec99f8fe5cdda56f47b166 Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- platform/pci.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 platform/pci.h (limited to 'platform') diff --git a/platform/pci.h b/platform/pci.h new file mode 100644 index 00000000..f63529b7 --- /dev/null +++ b/platform/pci.h @@ -0,0 +1,25 @@ +/* + * This is a wrapper for libpci. + * ... + */ + + +#ifndef __PLATFORM_PCI_H__ +#define __PLATFORM_PCI_H__ + +/* + * An old libpci version seems to use the variable name "index" which triggers + * shadowing warnings on systems which have the index() function in a default + * #include or as builtin. + */ +#define index shadow_workaround_index + +#if defined (__NetBSD__) +#include +#else +#include +#endif + +#undef index + +#endif /* __PLATFORM_PCI_H__ */ \ No newline at end of file -- cgit v1.2.3