spi: uapi: spidev: add missing ioctl header
authorBaruch Siach <baruch@tkos.co.il>
Sun, 10 Sep 2017 17:29:45 +0000 (20:29 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 1 Jan 2018 20:50:48 +0000 (20:50 +0000)
commitcd2f884550494fff41b80cf11b0a5568edd2706f
tree0d324bafd280c882355650f26437109c7f36ca8d
parentf3b2148eda63b42e082259aaf1622c9ae2d53ac8
spi: uapi: spidev: add missing ioctl header

commit a2b4a79b88b24c49d98d45a06a014ffd22ada1a4 upstream.

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);
                        ^

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Mark Brown <broonie@kernel.org>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/linux/spi/spidev.h