aboutsummaryrefslogtreecommitdiffstats
path: root/include/platform/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/platform/pci.h')
-rw-r--r--include/platform/pci.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/platform/pci.h b/include/platform/pci.h
new file mode 100644
index 00000000..93bc163b
--- /dev/null
+++ b/include/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 <pci.h>
+#else
+#include <pci/pci.h>
+#endif
+
+#undef index
+
+#endif /* __PLATFORM_PCI_H__ */ \ No newline at end of file