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

相关文章:

  • 2021-04-12
  • 2022-02-27
  • 2018-05-16
  • 2021-09-15
  • 2021-06-30
  • 2021-07-10
  • 2021-05-29
  • 2022-02-26
猜你喜欢
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案