lib/sha256: fix compile on some hosts
PATCH 1/1 lib/sha256: fix compile on some hosts
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.
---
lib/sha256.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/sha256.c +3 -1
@@ -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> /*
Signature · 1 line
1.9.2
PATCH 1/1 lib/sha256: fix compile on some hosts
Hi Andreas,
Quoted 5 lines · Andreas Bie?mann
Commit
2842c1c24269a05142802d25520e7cb9035e456cintroduced 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 alinux/string.hwhich will lead to take the U-Boot providedinclude/linux/string.hin the end. This header howver is completely wrong
s/howver/however
Quoted 17 lines
here. Just take the
string.hif compiling with HOSTCC andlinux/string.hwhen not.Signed-off-by Andreas Bie?mann <[email protected]>Cc Heiko Schocher <[email protected]>---
lib/sha256.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)lib/sha256.c +0
-0@@ -8,9 +8,11 @@#ifndef USE_HOSTCC
lib/sha256.c line 18
Quoted 10 lines
lib/sha256.c +3
-1#include <common.h> +#include <linux/string.h> +#else +#include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> -#include <linux/string.h> #include <sha256.h> /*
Best Regards,
Bo Shen
PATCH 1/1 lib/sha256: fix compile on some hosts
In reply to Andreas BießmannHello Andreas,
Am 20.04.2014 10:34, schrieb Andreas Bie?mann:
Quoted 8 lines
Commit
2842c1c24269a05142802d25520e7cb9035e456cintroduced 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 alinux/string.hwhich will lead to take the U-Boot providedinclude/linux/string.hin the end. This header howver is completely wrong here. Just take thestring.hif compiling with HOSTCC andlinux/string.hwhen not.
Quoted 6 lines
Signed-off-by Andreas Bie?mann<[email protected]>Cc Heiko Schocher<[email protected]>---
lib/sha256.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 11 lines · Andreas Bie?mann
Commit
2842c1c24269a05142802d25520e7cb9035e456cintroduced 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 alinux/string.hwhich will lead to take the U-Boot providedinclude/linux/string.hin the end. This header howver is completely wrong here. Just take thestring.hif compiling with HOSTCC andlinux/string.hwhen not.Signed-off-by Andreas Bie?mann <[email protected]>Cc Heiko Schocher <[email protected]>Acked-by Heiko Schocher<[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140512/d4ebffb6/attachment.pgp>