summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-06-25 13:18:48 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-06-25 13:18:48 +0000
commit7237683faff7d67a7caac9addb6ef5e6944db0b1 (patch)
treed67df6db6093d73939f07078ce1df6900456752c /Makefile
parent2bd007a97e16487e2a2780eec63e148aaaad4c5c (diff)
downloadast2050-flashrom-7237683faff7d67a7caac9addb6ef5e6944db0b1.zip
ast2050-flashrom-7237683faff7d67a7caac9addb6ef5e6944db0b1.tar.gz
Work around shadowing warnings in libpci headers
This is needed for warning-free compilation on older gcc versions (3.x and probably older). Such a gcc version is the default on i386 OpenBSD. Corresponding to flashrom svn r1061. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stuart Henderson <sthen@openbsd.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 723a15b..00ab0b2 100644
--- a/Makefile
+++ b/Makefile
@@ -310,7 +310,9 @@ compiler: featuresavailable
ifeq ($(CHECK_LIBPCI), yes)
pciutils: compiler
@printf "Checking for libpci headers... "
- @$(shell ( echo "#include <pci/pci.h>"; \
+ @# Avoid a failing test due to libpci header symbol shadowing breakage
+ @$(shell ( echo "#define index shadow_workaround_index"; \
+ echo "#include <pci/pci.h>"; \
echo "struct pci_access *pacc;"; \
echo "int main(int argc, char **argv)"; \
echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
OpenPOWER on IntegriCloud