0001-Add-missing-header-for-musl-compatibility.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 1d8cb0ad54099c3d7261aaa19a2c0786f16736d0 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sat, 8 Aug 2015 22:42:39 +0200
  4. Subject: [PATCH] Add missing header for musl compatibility
  5. <linux/ioctl.h> is needed to get the definition of _IOC_SIZEBITS and
  6. solve the following build failure:
  7. src/spi.c: In function 'spi_transfer':
  8. src/spi.c:100:24: error: '_IOC_SIZEBITS' undeclared (first use in this function)
  9. if (ioctl(spi->fd, SPI_IOC_MESSAGE(1), &spi_xfer) < 1)
  10. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  11. [Port from c-periphery]
  12. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  13. ---
  14. src/spi.c | 1 +
  15. 1 file changed, 1 insertion(+)
  16. diff --git a/lua-periphery/c-periphery/src/spi.c b/lua-periphery/c-periphery/src/spi.c
  17. index 52a8d3d..1a6b17c 100644
  18. --- a/lua-periphery/c-periphery/src/spi.c
  19. +++ b/lua-periphery/c-periphery/src/spi.c
  20. @@ -16,6 +16,7 @@
  21. #include <errno.h>
  22. #include <sys/ioctl.h>
  23. +#include <linux/ioctl.h>
  24. #include <linux/spi/spidev.h>
  25. #include "spi.h"
  26. --
  27. 2.5.0