From: Baruch Siach Date: Fri, 12 Aug 2016 13:04:33 +0000 (+0300) Subject: spi: spidev_test: fix build with musl libc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8736f8022e532a3c1d8873aac78e1113c6ffc3b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi: spidev_test: fix build with musl libc 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 Signed-off-by: Mark Brown --- diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c index 8a73d8185316..1eaa4de6605b 100644 --- a/tools/spi/spidev_test.c +++ b/tools/spi/spidev_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include