xref: /OK3568_Linux_fs/buildroot/package/let-me-create/0001-fix-build-with-musl-C-library.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 93fbc53a727a49dd5061e44e3156ff2044e6e0b5 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Rahul Bedarkar <rahulbedarkar89@gmail.com>
3*4882a593SmuzhiyunDate: Tue, 1 Aug 2017 22:44:22 +0530
4*4882a593SmuzhiyunSubject: [PATCH] fix build with musl C library
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunWith musl C library, we get following build error:
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun/home/buildroot/autobuild/run/instance-3/output/build/let-me-create-v1.5.2/src/core/spi.c: In function 'spi_transfer':
9*4882a593Smuzhiyun/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)
10*4882a593Smuzhiyunif (ioctl(fd, SPI_IOC_MESSAGE(1), &tr) < 0) {
11*4882a593Smuzhiyun^
12*4882a593Smuzhiyun/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*4882a593Smuzhiyun
14*4882a593SmuzhiyunInclude <linux/ioctl.h> for musl C library compatibility.
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunThis build issue is detected by Buildroot autobuilder:
17*4882a593Smuzhiyunhttp://autobuild.buildroot.net/results/af9/af946fa6fe05ee265e4ac97742b15afeb0cea1ab/
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunSigned-off-by: Rahul Bedarkar rahulbedarkar89@gmail.com
20*4882a593Smuzhiyun---
21*4882a593SmuzhiyunUpstream status: https://github.com/CreatorDev/LetMeCreate/pull/29
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun src/core/spi.c | 1 +
24*4882a593Smuzhiyun 1 file changed, 1 insertion(+)
25*4882a593Smuzhiyun
26*4882a593Smuzhiyundiff --git a/src/core/spi.c b/src/core/spi.c
27*4882a593Smuzhiyunindex 4d55cee..9ec7ea9 100644
28*4882a593Smuzhiyun--- a/src/core/spi.c
29*4882a593Smuzhiyun+++ b/src/core/spi.c
30*4882a593Smuzhiyun@@ -1,4 +1,5 @@
31*4882a593Smuzhiyun #include <sys/ioctl.h>
32*4882a593Smuzhiyun+#include <linux/ioctl.h>
33*4882a593Smuzhiyun #include <linux/spi/spidev.h>
34*4882a593Smuzhiyun #include <fcntl.h>
35*4882a593Smuzhiyun #include <errno.h>
36*4882a593Smuzhiyun--
37*4882a593Smuzhiyun2.7.4
38*4882a593Smuzhiyun
39