aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2021-11-02 21:03:00 +0100
committerNico Huber <nico.h@gmx.de>2021-12-22 12:33:15 +0000
commit88c871e74cb9d8b6f6f38747d1caae916364e2a2 (patch)
tree976da5400ced468d2b1862977a2c138c2ae32f54 /platform
parent9469f81d8f8154e7e71890ca94aaee8d550093ac (diff)
downloadflashrom-88c871e74cb9d8b6f6f38747d1caae916364e2a2.tar.gz
flashrom-88c871e74cb9d8b6f6f38747d1caae916364e2a2.tar.bz2
flashrom-88c871e74cb9d8b6f6f38747d1caae916364e2a2.zip
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> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'platform')
-rw-r--r--platform/pci.h25
1 files changed, 25 insertions, 0 deletions
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 <pciutils/pci.h>
+#else
+#include <pci/pci.h>
+#endif
+
+#undef index
+
+#endif /* __PLATFORM_PCI_H__ */ \ No newline at end of file