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

拥有回忆 提交于 2020-07-28 08:14:14
[root@localhost nagios-plugins-1.4.16]# ./configure
[root@localhost nagios-plugins-1.4.16]# make 
mv -f .deps/full-write.Tpo .deps/full-write.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../intl   -g -O2 -MT localcharset.o -MD -MP -MF .deps/localcharset.Tpo -c -o localcharset.o localcharset.c
In file included from localcharset.c:26:0:
./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 `/usr/local/monitor/nagios-plugins-1.4.16/gl'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/monitor/nagios-plugins-1.4.16/gl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/monitor/nagios-plugins-1.4.16/gl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/monitor/nagios-plugins-1.4.16'
make: *** [all] Error 2
[root@localhost nagios-plugins-1.4.16]#

wKioL1iAd4KyZ0GcAABiyShpOc0229.png

删除stdio.in.h文件中_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");行

[root@localhost nagios-plugins-1.4.16]# find / -iname stdio.in.h
/usr/local/monitor/nagios-plugins-1.4.16/gl/stdio.in.h
[root@localhost nagios-plugins-1.4.16]# sed -i '/gets is a security/d' gl/stdio.in.h


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!