public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] lib/sha256: fix compile on some hosts
@ 2014-04-20  8:34 Andreas Bießmann
  2014-04-20 13:18 ` Bo Shen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andreas Bießmann @ 2014-04-20  8:34 UTC (permalink / raw)
  To: u-boot

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>
---

 lib/sha256.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/sha256.c b/lib/sha256.c
index 3212bab..b1085ea 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -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>
 
 /*
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] lib/sha256: fix compile on some hosts
  2014-04-20  8:34 [U-Boot] [PATCH] lib/sha256: fix compile on some hosts Andreas Bießmann
@ 2014-04-20 13:18 ` Bo Shen
  2014-04-25  4:59 ` Heiko Schocher
  2014-05-13  1:52 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Bo Shen @ 2014-04-20 13:18 UTC (permalink / raw)
  To: u-boot

Hi Andreas,

On 04/20/2014 04:34 PM, Andreas Bie?mann wrote:
> 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

s/howver/however

> 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>
> ---
>
>   lib/sha256.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/sha256.c b/lib/sha256.c
> index 3212bab..b1085ea 100644
> --- a/lib/sha256.c
> +++ b/lib/sha256.c
> @@ -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>
>
>   /*

Best Regards,
Bo Shen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] lib/sha256: fix compile on some hosts
  2014-04-20  8:34 [U-Boot] [PATCH] lib/sha256: fix compile on some hosts Andreas Bießmann
  2014-04-20 13:18 ` Bo Shen
@ 2014-04-25  4:59 ` Heiko Schocher
  2014-05-13  1:52 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2014-04-25  4:59 UTC (permalink / raw)
  To: u-boot

Hello Andreas,

Am 20.04.2014 10:34, schrieb Andreas Bie?mann:
> 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>
> ---
>
>   lib/sha256.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

Thanks!

Acked-by: Heiko Schocher<hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] lib/sha256: fix compile on some hosts
  2014-04-20  8:34 [U-Boot] [PATCH] lib/sha256: fix compile on some hosts Andreas Bießmann
  2014-04-20 13:18 ` Bo Shen
  2014-04-25  4:59 ` Heiko Schocher
@ 2014-05-13  1:52 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-05-13  1:52 UTC (permalink / raw)
  To: u-boot

On Sun, Apr 20, 2014 at 10:34:15AM +0200, Andreas Bie?mann wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-13  1:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-20  8:34 [U-Boot] [PATCH] lib/sha256: fix compile on some hosts Andreas Bießmann
2014-04-20 13:18 ` Bo Shen
2014-04-25  4:59 ` Heiko Schocher
2014-05-13  1:52 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox