summaryrefslogtreecommitdiffstats
path: root/package/lcdproc/0001-Add-missing-ioctl-header.patch
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2017-09-08 14:31:14 +0300
committerPeter Korsgaard <peter@korsgaard.com>2017-09-20 19:22:55 +0200
commitfd70d0b4348d20b3965da2c4b02debc4a8e987da (patch)
treead3fa140fbccba8a3cebb7fdd2bc19eb069c7eab /package/lcdproc/0001-Add-missing-ioctl-header.patch
parent74ac045c80893177fc7a8b3672245bb9ab132773 (diff)
downloadbuildroot-fd70d0b4348d20b3965da2c4b02debc4a8e987da.tar.gz
buildroot-fd70d0b4348d20b3965da2c4b02debc4a8e987da.zip
lcdproc: fix build with musl libc
Add a patch adding missing linux ioctl header. Fixes: http://autobuild.buildroot.net/results/58a/58a9b98d08060c6ed9e8855ba9f59d03aa2f3e2c/ http://autobuild.buildroot.net/results/5b2/5b2c1bc872cebc7aadf93995b71178bba29e0b25/ http://autobuild.buildroot.net/results/125/12594e613f8fc106e477411f76093654a084c01c/ Cc: Sven Haardiek <sven.haardiek@greenbone.net> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/lcdproc/0001-Add-missing-ioctl-header.patch')
-rw-r--r--package/lcdproc/0001-Add-missing-ioctl-header.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/lcdproc/0001-Add-missing-ioctl-header.patch b/package/lcdproc/0001-Add-missing-ioctl-header.patch
new file mode 100644
index 0000000000..8c2123594f
--- /dev/null
+++ b/package/lcdproc/0001-Add-missing-ioctl-header.patch
@@ -0,0 +1,50 @@
+From 6267665454501512ac054202b38e4e6a72fa284b Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Fri, 8 Sep 2017 14:19:11 +0300
+Subject: [PATCH] Add missing ioctl header
+
+The spidev.h header uses macros from linux/ioctl.h. Add this header
+explicitly since some libc, like musl, do not include it implicitly.
+This fixes the following build failure:
+
+In file included from .../sysroot/usr/include/sys/ioctl.h:7:0,
+ from hd44780-spi.c:31:
+hd44780-spi.c: In function ‘spi_transfer’:
+hd44780-spi.c:89:24: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
+ status = ioctl(p->fd, SPI_IOC_MESSAGE(1), &xfer);
+ ^
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/lcdproc/lcdproc/pull/90
+
+ server/drivers/hd44780-pifacecad.c | 1 +
+ server/drivers/hd44780-spi.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/server/drivers/hd44780-pifacecad.c b/server/drivers/hd44780-pifacecad.c
+index a73b9f9b1f82..55139124d852 100644
+--- a/server/drivers/hd44780-pifacecad.c
++++ b/server/drivers/hd44780-pifacecad.c
+@@ -54,6 +54,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#include <linux/ioctl.h>
+ #include <stdint.h>
+ #include <linux/spi/spidev.h>
+
+diff --git a/server/drivers/hd44780-spi.c b/server/drivers/hd44780-spi.c
+index 791156f87a26..74c85fb014aa 100644
+--- a/server/drivers/hd44780-spi.c
++++ b/server/drivers/hd44780-spi.c
+@@ -29,6 +29,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#include <linux/ioctl.h>
+ #include <stdint.h>
+ #include <linux/spi/spidev.h>
+
+--
+2.14.1
+
OpenPOWER on IntegriCloud