libiconv-1.14 error: ‘gets’ undeclared here (not in a function)
来源:互联网 发布:只有我知双语未删减版 编辑:程序博客网 时间:2024/06/05 15:46
centos7下编译安装libiconv-1.14报错,信息如下:
1
2
3
4
5
6
7
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");
^
make[1]: *** [progname.o] Error 1
make[1]: Leaving directory `/root/lnmp1.2/source/libiconv-1.14/srclib'
make: *** [all] Error 2
解决方法:
编辑 libiconv-1.14/srclib/stdio.h 文件,这个文件在make之后才会生成,源码中是没有的。
1
2
3
4
1007 /* It is very rare that the developer ever has full control of stdin,
1008 so any use of gets warrants an unconditional warning. Assume it is
1009 always declared, since it is required by C89. */
1010 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
第1010行,把 _GL_WARN_ON_USE (gets, “gets is a security hole – use fgets instead”); 外面加一个if,
改为:
1
2
3
#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 通过
原创文章,转载请注明。本文链接地址: http://www.rootop.org/pages/3532.html
阅读全文
0 0
- libiconv-1.14 error: ‘gets’ undeclared here (not in a function)
- 源码编译安装 libiconv-1.14 报:./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function) [
- 编译 libiconv-1.14 的时候出现 ./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- 解决编译libiconv时报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- Ubuntu14.04_64编译libiconv出问题 ./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- ./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
- ./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
- 在ubuntu上编译toolchain时出错./stdio.h:477: error: 'gets' undeclared here (not in a function)
- 解决nagios报错:./stdio.h:456:1: error: 'gets' undeclared here (not in a function)的问题
- 解析linux patch(解决报错./stdio.h:456:1: error: 'gets' undeclared here (not in a function))
- `uint32_t' undeclared here (not in a function)
- PHP扩展开发报错解决[error: ‘PHP_FE_END’ undeclared here (not in a function)] .
- /phalcon.zep.c:130892: error: ‘ZEND_FE_END’ undeclared here (not in a function)
- /data/TestModule2/TestModule.c:26:25: error: ‘UTS_RELEASE’ undeclared here (not in a function) char
- 【SystemTap】 2.6.36 内核下运行SystemTap出现 error:‘param_ops_int64_t’ undeclared here (not in a function) 错误
- Android之ndk-build出现c:28:51: error: 'get_string' undeclared here (not in a function)解决办法
- php动态加载模块的时候出现PHP_FE_END’未声明(不在函数内) -----{error: ‘PHP_FE_END’ undeclared here (not in a function)}
- C++ & Pascal——NOIP2016提高组day2 t3——愤怒的小鸟
- c++ boost 库中提供的share_ptr(智能指针)
- Qt入门之信号与槽机制
- Matlab画图常用命令
- [Makefile-随笔] ifdef多条件判断
- libiconv-1.14 error: ‘gets’ undeclared here (not in a function)
- 【WEB】Vue2.0音乐APP实战中的知识点总结(三)
- HOG特征原理
- SpringMVC的视图解析器用法
- hdu6053TrickGCD(莫比乌斯反演)
- STL源码剖析——关联式容器的总结
- 【视频开发】【Live555】摄像头采集,264编码,live555直播(0)
- Android 自定义代码快捷键和代码小技巧
- 判断一棵树是否是完全二叉树