From 047c98a2c1b9a9dfc4568b1b1471aab7cfcae606 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 21 May 2013 10:46:28 -0700 Subject: libpayload: fix wrong endian assumption in sha1.c Not all platforms !x86 are big endian, hence actually look at the CONFIG_LITTLE_ENDIAN flag instead of CONFIG_ARCH_X86. Change-Id: Ibbd8f48b377a1121dd1e045834a94a2d67eda2ab Signed-off-by: Stefan Reinauer Reviewed-on: https://gerrit.chromium.org/gerrit/56066 Reviewed-by: Patrick Georgi Reviewed-by: Ronald G. Minnich Commit-Queue: Stefan Reinauer Tested-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/4236 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- payloads/libpayload/crypto/sha1.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'payloads/libpayload/crypto') diff --git a/payloads/libpayload/crypto/sha1.c b/payloads/libpayload/crypto/sha1.c index 3c97bf1895..c973e183db 100644 --- a/payloads/libpayload/crypto/sha1.c +++ b/payloads/libpayload/crypto/sha1.c @@ -30,18 +30,12 @@ typedef unsigned int u_int; /* Moved from libpayload.h */ -#ifdef CONFIG_ARCH_X86 +#ifdef CONFIG_LITTLE_ENDIAN #define BYTE_ORDER LITTLE_ENDIAN #else #define BYTE_ORDER BIG_ENDIAN #endif -#if 0 -#include -#include -#include -#endif - #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* -- cgit v1.2.3