From 06b9efa5e894fc2b751d27fcc0544355a2ee3d31 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 7 Aug 2012 11:59:59 +0000 Subject: Fix missing #include hwaccess.h In r1549 #include "hwaccess.h" was moved to individual drivers. Unfortunately, flashrom.c was forgotten. This caused flashrom to falsely report an unknown PCI library version and big-endianness on all platforms. Add #include "hwaccess.h". Explicitly check for __flashrom_BIG_ENDIAN__ Corresponding to flashrom svn r1562. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Carl-Daniel Hailfinger --- flashrom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index fc52c4a..04e9934 100644 --- a/flashrom.c +++ b/flashrom.c @@ -37,6 +37,7 @@ #include "flash.h" #include "flashchips.h" #include "programmer.h" +#include "hwaccess.h" const char flashrom_version[] = FLASHROM_VERSION; char *chip_to_probe = NULL; @@ -1529,8 +1530,10 @@ void print_buildinfo(void) #endif #if defined (__FLASHROM_LITTLE_ENDIAN__) msg_gdbg(" little endian"); -#else +#elif defined (__FLASHROM_BIG_ENDIAN__) msg_gdbg(" big endian"); +#else +#error Endianness could not be determined #endif msg_gdbg("\n"); } -- cgit v1.1