make && make install报如下错误:

./stdio.h:1010:1: 错误:‘gets’未声明(不在函数内)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
make[2]: *** [progname.o] 错误 1
make[2]: 离开目录“/usr/local/src/libiconv-1.14/srclib”
make[1]: *** [all] 错误 2
make[1]: 离开目录“/usr/local/src/libiconv-1.14/srclib”
make: *** [all] 错误 2

解决办法如下:

[root@lamp libiconv-1.14]# vi /usr/local/src/libiconv-1.14/srclib/stdio.in.h    #<===将698行的代码替换
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #<===替换为以下3行 #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
05-11 16:23