解决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
版版权所有:ForrestWang,转载请注明出处!