Fix and improve libpayload platform support

- Fix various minor compile issues (eg. include necessary standard headers)
- Fix compilation of libpayload code paths
- Provide libpayload support in Makefile
- Add make target "libflashrom.a" which links non-CLI code to static

Corresponding to flashrom svn r1280.

Signed-off-by: Patrick Georgi <>
Tested-with-DOS-crosscompiler-by: Idwer Vollering <>
Acked-by: Carl-Daniel Hailfinger <>
diff --git a/spi.c b/spi.c
index 79b5ad5..7e9ff1a 100644
--- a/spi.c
+++ b/spi.c
@@ -22,6 +22,7 @@
  * Contains the generic SPI framework
+#include <strings.h>
 #include <string.h>
 #include "flash.h"
 #include "flashchips.h"