Skip to contentSkip to conversation

Fix build issue with string.h and linux/string.h

PATCH New Andy Fleming 2 participants 2 messages Jun 11, 2008 – Jun 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix build issue with string.h and linux/string.h

This commit:
commit 338cc038461a6c7709c5b86fd9a240209338a1ae

Author: Wolfgang Denk <[email protected]>
Date:   Fri Jun 6 14:28:14 2008 +0200

tools/mkimage: fix compiler warnings on some systems.

Broke building on some systems, because the host's string.h was interfering with u-boot's linux/string.h. It doesn't look like we need the u-boot one if we're building for the host, so now we only include when building inside u-boot.

---
 lib_generic/md5.c  |    2 +-
 lib_generic/sha1.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib_generic/md5.c +1 -1
index a9aae46..9150510 100644
@@ -27,12 +27,12 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <linux/string.h>
 #else
 #include <string.h>
 #endif /* USE_HOSTCC */
 #include <watchdog.h>
 #include <linux/types.h>
-#include <linux/string.h>
 #include <u-boot/md5.h>
 
 static void
lib_generic/sha1.c +1 -1
index a192e5f..da5bc16 100644
@@ -31,11 +31,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 "sha1.h"
 
 /*
Signature · 1 line
1.5.4.GIT
#1 lore raw

PATCH 1/1 Fix build issue with string.h and linux/string.h

Quoted 12 lines · In message <[email protected]> you wrote:

This commit:
commit 338cc038461a6c7709c5b86fd9a240209338a1ae

Author: Wolfgang Denk <[email protected]>
Date:   Fri Jun 6 14:28:14 2008 +0200

tools/mkimage: fix compiler warnings on some systems.

Broke building on some systems, because the host's string.h was interfering with u-boot's linux/string.h. It doesn't look like we need the u-boot one if we're building for the host, so now we only include when building inside u-boot.

Quoted 5 lines
---
 lib_generic/md5.c  |    2 +-
 lib_generic/sha1.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never call a man a fool.  Borrow from him.