2
1

0001-Fix-build-with-musl-libc.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 3d6e59bff088783f249a60a5f1c900c7f99f933b Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd.kuhls@t-online.de>
  3. Date: Sun, 31 Jan 2016 15:03:50 +0100
  4. Subject: [PATCH 1/1] Fix build with musl libc
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Include missing header to prevent build error:
  9. spidev_module.c: In function ‘SpiDev_xfer’:
  10. spidev_module.c:330:27: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
  11. status = ioctl(self->fd, SPI_IOC_MESSAGE(1), &xfer);
  12. ^
  13. spidev_module.c:330:27: note: each undeclared identifier is reported only once for each function it appears in
  14. spidev_module.c: In function ‘SpiDev_xfer2’:
  15. spidev_module.c:421:27: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
  16. status = ioctl(self->fd, SPI_IOC_MESSAGE(1), &xfer);
  17. ^
  18. Signed-off-by: Bernd Kuhls bernd.kuhls@t-online.de
  19. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  20. ---
  21. Patch sent upstream: https://github.com/doceme/py-spidev/pull/39
  22. spidev_module.c | 1 +
  23. 1 file changed, 1 insertion(+)
  24. diff --git a/spidev_module.c b/spidev_module.c
  25. index d58ef07..bccaacf 100644
  26. --- a/spidev_module.c
  27. +++ b/spidev_module.c
  28. @@ -25,6 +25,7 @@
  29. #include <linux/spi/spidev.h>
  30. #include <linux/types.h>
  31. #include <sys/ioctl.h>
  32. +#include <linux/ioctl.h>
  33. #define SPIDEV_MAXPATH 4096
  34. --
  35. 2.7.0