解决nagios报错:./stdio.h:456:1: error: 'gets' undeclared here (not in a function)的问题

来源:互联网 发布:mysql 重命名字段 编辑:程序博客网 时间:2024/05/17 22:16
./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
make[4]: *** [localcharset.o] Error 1
make[4]: Leaving directory `/home/oldboy/tools/nagios/nagios-plugins-1.4.16/gl'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/oldboy/tools/nagios/nagios-plugins-1.4.16/gl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/oldboy/tools/nagios/nagios-plugins-1.4.16/gl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/oldboy/tools/nagios/nagios-plugins-1.4.16'

make: *** [all] Error 2

查找这个文件位置./stdio.h

 find / -name stdio.in.h

/home/oldboy/tools/nagios/nagios-plugins-1.4.16/gl/stdio.in.h

要修改stdio.in.h 内容

sed -i -e '/gets is a security/d' ./stdio.in.h       

参考:http://www.dataguru.cn/thread-562562-1-1.html

http://www.l68.net/49.html

0 0