summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2016-08-12 16:04:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-21 10:11:37 +0100
commitda6fe239ceffd8bbe1463c361283f0c4c756c983 (patch)
treeb0fd15dd614e46f558854ac118b7c0a87e0c1c89 /tools
parent4ea98e573d65b79714d99a4707b771d3a8ec98ae (diff)
spi: spidev_test: fix build with musl libc
commit 8736f8022e532a3c1d8873aac78e1113c6ffc3b9 upstream. spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro unless linux/ioctl.h is included explicitly. Fixes build failures like: In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0, from .../build/spidev_test-v3.15/spidev_test.c:20: .../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’: .../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); ^ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: Ralph Sennhauser <ralph.sennhauser@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/spi/spidev_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index f3825b676e38..f046b77cfefe 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -19,6 +19,7 @@
#include <getopt.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <linux/ioctl.h>
#include <sys/stat.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>