Chinaunix首页 | 论坛 | 博客
  • 博客访问: 410443
  • 博文数量: 43
  • 博客积分: 613
  • 博客等级: 中士
  • 技术积分: 756
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-01 11:25
文章分类

全部博文(43)

文章存档

2016年(1)

2015年(5)

2014年(5)

2013年(14)

2012年(18)

分类: 架构设计与优化

2015-12-02 16:28:47

  在centos7下安装libiconv-1.14.tar.gz时遇到如下错误:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)


  解决方法如下:
  vi  srclib/stdio.h
  找到
  /* It is very rare that the developer ever has full control of stdin,
  so any use of gets warrants an unconditional warning.  Assume it is
  always declared, since it is required by C89.  */
  _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
然后去掉:  
_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


   然后重新make && make install,问题解决。
阅读(7447) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~