mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00

Use `make HAS_LIBPCI=yes/no` to override the pkg-config detection and `CONFIG_LIBPCI_CFLAGS` and `CONFIG_LIBPCI_LDFLAGS` to set cflags and ldflags manually. The optional dependency of libpci libz, is automatically handled by pkg-config. Change-Id: I21b4a261b34b7e688635fc6e20b7beebfa64c7ed Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/59050 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
18 lines
393 B
C
18 lines
393 B
C
/* Avoid a failing test due to libpci header symbol shadowing breakage */
|
|
#define index shadow_workaround_index
|
|
#if !defined __NetBSD__
|
|
#include <pci/pci.h>
|
|
#else
|
|
#include <pciutils/pci.h>
|
|
#endif
|
|
struct pci_access *pacc;
|
|
struct pci_dev *dev = {0};
|
|
int main(int argc, char **argv)
|
|
{
|
|
(void) argc;
|
|
(void) argv;
|
|
pacc = pci_alloc();
|
|
dev = pci_get_dev(pacc, dev->bus, dev->dev, 1);
|
|
return 0;
|
|
}
|