xref: /OK3568_Linux_fs/buildroot/package/let-me-create/0001-fix-build-with-musl-C-library.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 93fbc53a727a49dd5061e44e3156ff2044e6e0b5 Mon Sep 17 00:00:00 2001
2From: Rahul Bedarkar <rahulbedarkar89@gmail.com>
3Date: Tue, 1 Aug 2017 22:44:22 +0530
4Subject: [PATCH] fix build with musl C library
5
6With musl C library, we get following build error:
7
8/home/buildroot/autobuild/run/instance-3/output/build/let-me-create-v1.5.2/src/core/spi.c: In function 'spi_transfer':
9/home/buildroot/autobuild/run/instance-3/output/build/let-me-create-v1.5.2/src/core/spi.c:170:19: error: '_IOC_SIZEBITS' undeclared (first use in this function)
10if (ioctl(fd, SPI_IOC_MESSAGE(1), &tr) < 0) {
11^
12/home/buildroot/autobuild/run/instance-3/output/build/let-me-create-v1.5.2/src/core/spi.c:170:19: note: each undeclared identifier is reported only once for each function it appears in
13
14Include <linux/ioctl.h> for musl C library compatibility.
15
16This build issue is detected by Buildroot autobuilder:
17http://autobuild.buildroot.net/results/af9/af946fa6fe05ee265e4ac97742b15afeb0cea1ab/
18
19Signed-off-by: Rahul Bedarkar rahulbedarkar89@gmail.com
20---
21Upstream status: https://github.com/CreatorDev/LetMeCreate/pull/29
22
23 src/core/spi.c | 1 +
24 1 file changed, 1 insertion(+)
25
26diff --git a/src/core/spi.c b/src/core/spi.c
27index 4d55cee..9ec7ea9 100644
28--- a/src/core/spi.c
29+++ b/src/core/spi.c
30@@ -1,4 +1,5 @@
31 #include <sys/ioctl.h>
32+#include <linux/ioctl.h>
33 #include <linux/spi/spidev.h>
34 #include <fcntl.h>
35 #include <errno.h>
36--
372.7.4
38
39