summaryrefslogtreecommitdiffstats
path: root/package/flashrom/0001-spi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/flashrom/0001-spi.patch')
-rw-r--r--package/flashrom/0001-spi.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/flashrom/0001-spi.patch b/package/flashrom/0001-spi.patch
new file mode 100644
index 0000000000..d28cb46f23
--- /dev/null
+++ b/package/flashrom/0001-spi.patch
@@ -0,0 +1,25 @@
+linux_spi: add missing include
+
+Some defines (e.g. _IOC_SIZEBITS) are defined in linux/ioctl.h,
+so it must be included before it is used, by SPI_IOC_MESSAGE
+from linux/spi/spidev.h
+
+Fixes build errors with the musl C library, as seen in these
+Buidlroot autobuilder failures:
+
+ http://autobuild.buildroot.org/results/2a3/2a3744007c630c267575a638ebcd83a4b97644f5/build-end.log
+ http://autobuild.buildroot.org/results/3de/3de936d9be79e151e66af15193084d82a0f2c04a/build-end.log
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN flashrom-0.9.8.orig/linux_spi.c flashrom-0.9.8/linux_spi.c
+--- flashrom-0.9.8.orig/linux_spi.c 2015-10-28 19:42:38.480285847 +0100
++++ flashrom-0.9.8/linux_spi.c 2015-10-28 19:43:15.492994613 +0100
+@@ -27,6 +27,7 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <linux/types.h>
++#include <linux/ioctl.h>
+ #include <linux/spi/spidev.h>
+ #include <sys/ioctl.h>
+ #include "flash.h"
OpenPOWER on IntegriCloud