From 2d62572d1dd0c37eb626fd8faa17b26690f20b15 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 3 May 2016 10:48:02 +0200 Subject: Fix linking with libpayload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit o Move flashbuses_to_text() to flashrom.c, it's not a cli function. o Guard `!defined(HAVE_STRNLEN)`. This guard was introduced in 23e10b87 (Add a bunch of new/tested stuff and various small changes 24) to support older BSDs. It's probably completely broken because HAVE_STRNLEN is presumably a GNU autotools thing. But we can't fix it without retesting these older BSDs. Change-Id: I561135209b819361d125eeaeef9ff886d6bae987 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/18738 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hendricks Tested-by: build bot (Jenkins) --- helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helpers.c') diff --git a/helpers.c b/helpers.c index f6eae466..8bc808ae 100644 --- a/helpers.c +++ b/helpers.c @@ -92,7 +92,7 @@ char* strtok_r(char *str, const char *delim, char **nextp) #endif /* There is no strnlen in DJGPP */ -#if defined(__DJGPP__) || !defined(HAVE_STRNLEN) +#if defined(__DJGPP__) || (!defined(__LIBPAYLOAD__) && !defined(HAVE_STRNLEN)) size_t strnlen(const char *str, size_t n) { size_t i; -- cgit v1.2.3