2
1

0002-Add-missing-ioctl-header.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 6267665454501512ac054202b38e4e6a72fa284b Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Fri, 8 Sep 2017 14:19:11 +0300
  4. Subject: [PATCH] Add missing ioctl header
  5. The spidev.h header uses macros from linux/ioctl.h. Add this header
  6. explicitly since some libc, like musl, do not include it implicitly.
  7. This fixes the following build failure:
  8. In file included from .../sysroot/usr/include/sys/ioctl.h:7:0,
  9. from hd44780-spi.c:31:
  10. hd44780-spi.c: In function ‘spi_transfer’:
  11. hd44780-spi.c:89:24: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
  12. status = ioctl(p->fd, SPI_IOC_MESSAGE(1), &xfer);
  13. ^
  14. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  15. ---
  16. Upstream status: https://github.com/lcdproc/lcdproc/pull/90
  17. server/drivers/hd44780-pifacecad.c | 1 +
  18. server/drivers/hd44780-spi.c | 1 +
  19. 2 files changed, 2 insertions(+)
  20. diff --git a/server/drivers/hd44780-pifacecad.c b/server/drivers/hd44780-pifacecad.c
  21. index a73b9f9b1f82..55139124d852 100644
  22. --- a/server/drivers/hd44780-pifacecad.c
  23. +++ b/server/drivers/hd44780-pifacecad.c
  24. @@ -54,6 +54,7 @@
  25. #include <unistd.h>
  26. #include <fcntl.h>
  27. #include <sys/ioctl.h>
  28. +#include <linux/ioctl.h>
  29. #include <stdint.h>
  30. #include <linux/spi/spidev.h>
  31. diff --git a/server/drivers/hd44780-spi.c b/server/drivers/hd44780-spi.c
  32. index 791156f87a26..74c85fb014aa 100644
  33. --- a/server/drivers/hd44780-spi.c
  34. +++ b/server/drivers/hd44780-spi.c
  35. @@ -29,6 +29,7 @@
  36. #include <unistd.h>
  37. #include <fcntl.h>
  38. #include <sys/ioctl.h>
  39. +#include <linux/ioctl.h>
  40. #include <stdint.h>
  41. #include <linux/spi/spidev.h>
  42. --
  43. 2.14.1