mv -f .deps/c-stack.Tpo .deps/c-stack.Po
i686-linux-gnu-gcc -std=gnu99 -I. -O2
-I/home/openwrt-dreambox/staging_dir/host/include -O2
-I/home/openwrt-dreambox/staging_dir/host/include -MT
clean-temp.o -MD -MP -MF .deps/clean-temp.Tpo -c -o clean-temp.o
clean-temp.c
In file included from clean-temp.h:22:0,
from clean-temp.c:23:
./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
make[7]: *** [clean-temp.o] Error 1
make[7]: Leaving directory `/home/openwrt-dreambox/build_dir/host/m4-1.4.15/lib'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/home/openwrt-dreambox/build_dir/host/m4-1.4.15/lib'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/openwrt-dreambox/build_dir/host/m4-1.4.15'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/openwrt-dreambox/build_dir/host/m4-1.4.15'
make[3]: *** [/home/openwrt-dreambox/build_dir/host/m4-1.4.15/.built] Error 2
make[3]: Leaving directory `/home/openwrt-dreambox/tools/m4'
make[2]: *** [tools/m4/compile] Error 2
make[2]: Leaving directory `/home/openwrt-dreambox'
make[1]: ***
[/home/openwrt-dreambox/staging_dir/target-mips_uClibc-0.9.30.1/stamp/.tools_install_nnynn]
Error 2
make[1]: Leaving directory `/home/openwrt-dreambox'
make: *** [world] Error 2
有以下两种解决办法:
1)进入到build_dir/host/m4-1.4.15/lib目录,更改stdio.in.h
#undef gets
#define gets(a) fgets( a, sizeof(*(a)), stdin)
2)可以使用以下命令
cd /home/openwrt-dreambox/build_dir/host/m4-1.4.15/lib
sed -i -e '/gets is a security/d' ./stdio.in.h
即可编译通过。
在另外在编localcharset.c 时出会出现类似的问题,同样是进入到build_dir/host/bison-2.4.3/lib
cd /home/openwrt-dreambox/build_dir/host/bison-2.4.3/lib
sed -i -e '/gets is a security/d' ./stdio.in.h
即可编译通过
阅读(3013) | 评论(0) | 转发(0) |