From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Sun, 20 Apr 2014 21:18:07 +0800 Subject: [U-Boot] [PATCH] lib/sha256: fix compile on some hosts In-Reply-To: <1397982855-12338-1-git-send-email-andreas.devel@googlemail.com> References: <1397982855-12338-1-git-send-email-andreas.devel@googlemail.com> Message-ID: <5353C90F.80607@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Heiko Schocher > --- > > 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 > +#include > +#else > +#include > #endif /* USE_HOSTCC */ > #include > -#include > #include > > /* Best Regards, Bo Shen