Skip to content

Commit

Permalink
Add missing header for musl compatibility
Browse files Browse the repository at this point in the history
<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>
  • Loading branch information
tpetazzoni authored and vsergeev committed Aug 10, 2015
1 parent 137d74e commit 27a9552
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/spi.c
Expand Up @@ -16,6 +16,7 @@
#include <errno.h>

#include <sys/ioctl.h>
#include <linux/ioctl.h>
#include <linux/spi/spidev.h>

#include "spi.h"
Expand Down

0 comments on commit 27a9552

Please sign in to comment.