dee3482e4f23307b4ec79846d473a3baad780661
[oweals/openwrt.git] /
1 From 7d52945b0b261c54ec736ecc435936c5fb8b81a4 Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Thu, 30 Nov 2017 11:07:12 +0800
4 Subject: [PATCH] Fix app compilation failure from inclusion of wrong headers
5
6 Compiling against glibc can fail with the following errors
7
8      In file included from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl-linux.h:321:0,
9                      from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl.h:104,
10                      from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/fcntl.h:35,
11                      from linux/ifxos_linux_device_access_appl.c:30:
12     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:12:2: error: unknown type name '__s16'
13       __s16  l_type;
14       ^
15     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:13:2: error: unknown type name '__s16'
16       __s16  l_whence;
17       ^
18     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:14:2: error: unknown type name '__s64'
19       __s64  l_start;
20       ^
21     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:15:2: error: unknown type name '__s64'
22       __s64  l_len;  /* len == 0 means until end of file */
23       ^
24     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:16:2: error: unknown type name '__s32'
25       __s32  l_sysid;
26       ^
27     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:17:2: error: unknown type name '__u32'
28       __u32  l_pid;
29       ^
30     /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:18:2: error: unknown type name '__s32'
31       __s32  l_pad[4]; /* reserved area */
32       ^
33     Makefile:1945: recipe for target 'libifxos_a-ifxos_linux_device_access_appl.o' failed
34
35 Ref: https://bugs.lede-project.org/index.php?do=details&task_id=1196
36 ---
37  src/Makefile.am | 6 +-----
38  1 file changed, 1 insertion(+), 5 deletions(-)
39
40 diff --git a/src/Makefile.am b/src/Makefile.am
41 index f95668f..d232e7f 100644
42 --- a/src/Makefile.am
43 +++ b/src/Makefile.am
44 @@ -14,11 +14,7 @@ lib_LIBRARIES = libifxos.a
45  
46  AM_CPPFLAGS = \
47         -I@srcdir@\
48 -       -I@srcdir@/include \
49 -       -I@KERNEL_INCL_PATH@ \
50 -       -I@KERNEL_BUILD_PATH@/include \
51 -       -I@KERNEL_BUILD_PATH@/include2 \
52 -       -I$(TARGET_INCL_PATH)
53 +       -I@srcdir@/include
54  
55  if HAVE_GCC
56  
57 -- 
58 1.8.3.1
59