./stdio.h:456:1: error: ‘gets’ undeclared here (not in a function)
elf.cpp:68:5: error: '::close' has not been declared:
修改 ./build_dir/host/m4-1.4.15/lib/stdio.h 以及 ./build_dir/host/bison-2.4.3/lib/stdio.h
注释掉分别为456行以及458行的_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
修改 ./build_dir/host/mklibs/src/mklibs-readelf/elf.cpp 增加 #include <unistd.h>
本文解决了一个与使用不安全函数gets有关的问题,在特定源文件中通过注释掉警告信息,并引入了unistd.h来解决未声明的函数问题。

1万+

被折叠的 条评论
为什么被折叠?



