From 822ef00e989f1b99d8f0554d74fa0d97ce007f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Sun, 20 Apr 2014 10:34:15 +0200 Subject: lib/sha256: fix compile on some hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 2842c1c24269a05142802d25520e7cb9035e456c introduced lib/sha256 into mkimage. Since then it will be compiled with HOSTCC which may produce errors on some systems. Most BSD systems (like OS X for me) do not ship a linux/string.h which will lead to take the U-Boot provided include/linux/string.h in the end. This header howver is completely wrong here. Just take the string.h if compiling with HOSTCC and linux/string.h when not. Signed-off-by: Andreas Bießmann Cc: Heiko Schocher Acked-by: Heiko Schocher --- lib/sha256.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sha256.c') diff --git a/lib/sha256.c b/lib/sha256.c index 3212baba5f..b1085ea791 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,9 +8,11 @@ #ifndef USE_HOSTCC #include +#include +#else +#include #endif /* USE_HOSTCC */ #include -#include #include /* -- cgit v1.2.1