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 <thomas.heijligen@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72264
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/platform/pci.h b/platform/pci.h
new file mode 100644
index 0000000..fdb0f48
--- /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 (PCIUTILS_PCI_H)
+#include <pciutils/pci.h>
+#else
+#include <pci/pci.h>
+#endif
+
+#undef index
+
+#endif /* __PLATFORM_PCI_H__ */