Add missing header for musl compatibility

<linux/ioctl.h> is needed to get the definition of _IOC_SIZEBITS and
solve the following build failure:

src/spi.c: In function 'spi_transfer':
src/spi.c:100:24: error: '_IOC_SIZEBITS' undeclared (first use in this function)
     if (ioctl(spi->fd, SPI_IOC_MESSAGE(1), &spi_xfer) < 1)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni
2015-08-08 22:42:39 +02:00
committed by Vanya Sergeev
parent 137d74ea73
commit 27a9552720

View File

@@ -16,6 +16,7 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/ioctl.h>
#include <linux/spi/spidev.h>
#include "spi.h"