Nico Huber merged this change.

View Change

Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve David Hendricks: Looks good to me, approved
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>
---
M spi.c
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/spi.c b/spi.c
index 894f73f..c306ac3 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"

To view, visit change 22951. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: 1.0.x
Gerrit-MessageType: merged
Gerrit-Change-Id: I92b69300a302c4491e234666ac371027571801c9
Gerrit-Change-Number: 22951
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>