1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

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>
This commit is contained in:
Thomas Heijligen
2021-11-02 21:03:00 +01:00
committed by Nico Huber
parent 9469f81d8f
commit 88c871e74c
24 changed files with 47 additions and 18 deletions

25
platform/pci.h Normal file
View File

@ -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__ */