The SPI_IOC_MESSAGE() macro references _IOC_SIZEBITS. Add linux/ioctl.h to make sure this macro is defined. This fixes the following build failure of lcdproc with the musl libc: 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); ^
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -23,6 +23,7 @@ · 22 unmodified lines | |||
| 23 | #define SPIDEV_H | 23 | #define SPIDEV_H |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
| 26 | #include <linux/ioctl.h> | ||
| 26 | 27 | ||
| 27 | /* User space versions of kernel symbols for SPI clocking modes, | 28 | /* User space versions of kernel symbols for SPI clocking modes, |
| 28 | * matching <linux/spi/spi.h> | 29 | * matching <linux/spi/spi.h> |