[Nagiosplug-devel] check_snmp 1.4.2 won't compile under gcc 2.*

Khan Klatt khan at khan.org
Wed Oct 5 12:56:13 CEST 2005


Yes, I submitted a fix for this, but I'm not familiar with how to get
patches applied to the codebase.

-K

> Hello.
>
> There  is  little  bug  in check_snmp.c (line 341) which is preventing
> compilation  on  platforms  using  gcc  2.*  (Solaris,  FreeBSD  4 for
> example).
>
> 341: char *str[MAX_INPUT_BUFFER];
> 342: asprintf(str, "=%s%s;;;; ", show, type ? type : "");
> 341: strcat(perfstr, *str);
>
> Older  gcc does not allow declarations here, this line should be moved
> to the top of main() (line 144 for example).
>
> This is somehow related to <30A4A13F-63D9-4FEB-8766-E436116A62E9 at khan.org>
> (Problem compiling check_snmp.c on Solaris 8 [with fix?])
>
> Details (for future list archive searches):
>
> gcc version 2.95.4 20020320 [FreeBSD]
>
> source='check_snmp.c' object='check_snmp.o' libtool=no \
> DEPDIR=.deps depmode=gcc /bin/sh ../depcomp \
> cc -DLOCALEDIR=\"/usr/local/share/nagios/locale\" -DHAVE_CONFIG_H -I. -I.
> -I.. -I.. -I../lib -I../intl     -I/usr/local/include   -O -pipe  -c
> check_snmp.c
> check_snmp.c: In function `main':
> check_snmp.c:341: syntax error before `char'
> check_snmp.c:342: `str' undeclared (first use in this function)
> check_snmp.c:342: (Each undeclared identifier is reported only once
> check_snmp.c:342: for each function it appears in.)
> gmake[2]: *** [check_snmp.o] Error 1
> gmake[2]: Leaving directory
> `/var/local/workdir/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-1.4.2/plugins'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/var/local/workdir/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-1.4.2'
> gmake: *** [all] Error 2
> *** Error code 2
>
>
> HTH.
> Ponc
> --
> Tomasz Pilat                          http://poncki.freebsd.pl./
> AXEL SPRINGER POLSKA Sp. z o.o.       PONC-RIPE | PGPKEY-EDEB47FC
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on e-mail/Usenet?
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>






More information about the Devel mailing list