mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
include/pci.h: Use __has_include() macro to test pci.h path
Some NetBSDs have the pci.h under pciutils/ instead of pci/. But we can't say for sure which variants uses which include path. Just test them with the __has_include() compiler macro. https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html Change-Id: Ib20de6bffede910b89937f554b4d56f4799f0762 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/73292 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
b8dae50599
commit
c433910718
@ -14,8 +14,12 @@
|
|||||||
*/
|
*/
|
||||||
#define index shadow_workaround_index
|
#define index shadow_workaround_index
|
||||||
|
|
||||||
#if defined (__NetBSD__)
|
/* Some NetBSDs are using an other include path for pci.h
|
||||||
#include <pci.h>
|
* e.g. NetBSD 9.0 on sparc64 pciutils-3.7.0nb2.
|
||||||
|
* Other NetBSD platforms and versions uses the default path under pci/pci.h
|
||||||
|
*/
|
||||||
|
#if __has_include(<pciutils/pci.h>)
|
||||||
|
#include <pciutils/pci.h>
|
||||||
#else
|
#else
|
||||||
#include <pci/pci.h>
|
#include <pci/pci.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user