diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-25 13:18:48 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-25 13:18:48 +0000 |
commit | e31cf6c8d87f8b2f56edab81feb59f8f91b44d93 (patch) | |
tree | d67df6db6093d73939f07078ce1df6900456752c /hwaccess.h | |
parent | fb06d5c44ee1c415cb57eb533c8e6575d899a811 (diff) | |
download | flashrom-e31cf6c8d87f8b2f56edab81feb59f8f91b44d93.zip flashrom-e31cf6c8d87f8b2f56edab81feb59f8f91b44d93.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 'hwaccess.h')
-rw-r--r-- | hwaccess.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -31,7 +31,14 @@ #endif #if NEED_PCI == 1 +/* + * libpci headers 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 #include <pci/pci.h> +#undef index #endif #if defined (__i386__) || defined (__x86_64__) |