php编译报错总结

 

php编译报错总结

一、报错信息如下

In file included from progname.c:26:0:
./stdio.in.h:1010:1: error: ‘gets’ undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^

解决办法:

1、通过find命令查找

 find /opt/libiconv-1.14 -type f -name 'stdio.in.h'

2、vim编辑698行文件

 698 /*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); */
 699 #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
 700  _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 701 #endif
 702 #endif

说明:注释掉698行/* _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); */即可。在698下添加699-701行。

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
百度已收录
Linux

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: