首页 / CENTOS / CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含856字,纯文字阅读大概需要2分钟。
内容图文
![CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error:](/upload/InfoBanner/zyjiaocheng/962/0e4c1ce68e2943ff94478573246bf47d.jpg)
?
1. libiconv编译时遇到以下报错
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[2]: *** [progname.o] Error 1 make[2]: Leaving directory `/usr/local/src/zabbix-2.4.7/libiconv-1.14/srclib' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/src/zabbix-2.4.7/libiconv-1.14/srclib' make: *** [all] Error 2
2. 解决问题
2.1 使用 find 查找并编辑 stion.in.h文件
[root@Tubao libiconv]# find / -name 'stdio.in.h' /server/tools/libiconv-1.14/srclib/stdio.in.h
2.2 通过关键字 gets 找到698 行,将其和695行一同注释
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
2.4 整体效果图,从695到702行
内容总结
以上是互联网集市为您收集整理的CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)全部内容,希望文章能够帮你解决CentOS7 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。