解决Centos7编译编译libiconv解决./stdio.h:1010:1: 错误: ‘gets’未声明(不在函数内

方法一:删除文件:stdio.in.h文件
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"),如下命令:

cd libiconv-1.14/srclib
sed -i -e '/gets is a security/d' ./stdio.in.h

方法二:将:/stdio.in.h文件中的:
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

改为:
#if defined(GLIBC) && !defined(UCLIBC) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif

posted @ 2016-01-27 12:09  Forrest.Wang  阅读(874)  评论(0编辑  收藏  举报