summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-12-20 00:42:16 +0100
committerNico Huber <nico.h@gmx.de>2017-12-21 10:59:16 +0000
commit1ca6bef2877ed4757710494fdd41823fe7122b09 (patch)
tree88e4a532ad7318c340cd9cadd9832c14455a69a3
parenta51a1923e5d49798d204860e1116fff17cc321ce (diff)
downloadflashrom-1ca6bef2877ed4757710494fdd41823fe7122b09.tar.gz
flashrom-1ca6bef2877ed4757710494fdd41823fe7122b09.tar.bz2
flashrom-1ca6bef2877ed4757710494fdd41823fe7122b09.zip
spi: Define _XOPEN_SOURCE to get ffs() from strings.h
Fixes build with Musl libc. Change-Id: I92b69300a302c4491e234666ac371027571801c9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22951 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
-rw-r--r--spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spi.c b/spi.c
index 894f73f60..c306ac351 100644
--- a/spi.c
+++ b/spi.c
@@ -22,6 +22,8 @@
* Contains the generic SPI framework
*/
+#define _XOPEN_SOURCE 700 /* for ffs() */
+
#include <strings.h>
#include <string.h>
#include "flash.h"