summaryrefslogtreecommitdiffstats
path: root/helpers.c
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2016-05-03 10:48:02 +0200
committerNico Huber <nico.h@gmx.de>2017-06-22 10:34:51 +0000
commit2d62572d1dd0c37eb626fd8faa17b26690f20b15 (patch)
treec76d5035e6fe7b8f9ca841c7030a7f44712f3d16 /helpers.c
parent8d494992176abe0877c88f06fdbc9c8d8826ae87 (diff)
downloadflashrom-2d62572d1dd0c37eb626fd8faa17b26690f20b15.tar.gz
flashrom-2d62572d1dd0c37eb626fd8faa17b26690f20b15.tar.bz2
flashrom-2d62572d1dd0c37eb626fd8faa17b26690f20b15.zip
Fix linking with libpayload
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 <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/18738 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'helpers.c')
-rw-r--r--helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/helpers.c b/helpers.c
index f6eae4665..8bc808ae7 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;