In file included from progname.c:26:0:
./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
cd /tmp/libiconv-1.14/srclib
vi 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
注意:结尾的#endif也要包括。