]> git.sur5r.net Git - u-boot/commitdiff
lib/sha256: fix compile on some hosts
authorAndreas Bießmann <andreas.devel@googlemail.com>
Sun, 20 Apr 2014 08:34:15 +0000 (10:34 +0200)
committerTom Rini <trini@ti.com>
Mon, 12 May 2014 19:19:46 +0000 (15:19 -0400)
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 <andreas.devel@googlemail.com>
Cc: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher<hs@denx.de>
lib/sha256.c

index 3212baba5f6c253f635220bd55b0c31707ae9341..b1085ea791759128dad36cc338bb8430d5389a32 100644 (file)
@@ -8,9 +8,11 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <linux/string.h>
+#else
+#include <string.h>
 #endif /* USE_HOSTCC */
 #include <watchdog.h>
-#include <linux/string.h>
 #include <sha256.h>
 
 /*