[Nagiosplug-devel] [ nagiosplug-Bugs-1484822 ] check_smtp.c in 1.4.3 fails to compile on Solaris 2.6

SourceForge.net noreply at sourceforge.net
Mon Jun 11 10:19:15 CEST 2007


Bugs item #1484822, was opened at 2006-05-09 18:31
Message generated for change (Comment added) made by psychotrahe
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1484822&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compilation
Group: Release (specify)
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Duncan Ferguson (duncan_ferguson)
Assigned to: Ton Voon (tonvoon)
Summary: check_smtp.c in 1.4.3 fails to compile on Solaris 2.6

Initial Comment:
make[3]: Entering directory
`/tmp/nagios-plugins-1.4.3/plugins'
if gcc
-DLOCALEDIR=\"/home/loki/fergusod/cvsroot/nagios2/shared/egg-nagioscl/package/usr/local/nagios2/share/locale\"
-DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl  
   -Wall -g -O2 -MT check_smtp.o -MD -MP -MF
".deps/check_smtp.Tpo" -c -o check_smtp.o check_smtp.c; \
then mv -f ".deps/check_smtp.Tpo"
".deps/check_smtp.Po"; else rm -f
".deps/check_smtp.Tpo"; exit 1; fi
check_smtp.c: In function `main':
check_smtp.c:179: warning: implicit declaration of
function `gethostbyname'
check_smtp.c:179: warning: assignment makes pointer
from integer without a cast
check_smtp.c:181: error: dereferencing pointer to
incomplete type
make[3]: *** [check_smtp.o] Error 1
make[3]: Leaving directory
`/tmp/nagios-plugins-1.4.3/plugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/tmp/nagios-plugins-1.4.3/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/nagios-plugins-1.4.3'
make: *** [all] Error 2



----------------------------------------------------------------------

>Comment By: Matthias Eble (psychotrahe)
Date: 2007-06-11 10:19

Message:
Logged In: YES 
user_id=1694341
Originator: NO

Announced pending state by sending emails to the participants.

----------------------------------------------------------------------

Comment By: Duncan Ferguson (duncan_ferguson)
Date: 2007-02-02 20:46

Message:
Logged In: YES 
user_id=865292
Originator: YES

Thanks. However, since I have just changed job I am unable to test.

This one is down to bubbafat.

  Duncs

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2007-02-02 18:05

Message:
Logged In: YES 
user_id=664364
Originator: NO

Hi Duncan and bubbafat,

Hi Duncan,

I think this is fixed in CVS now. Please can you try the snapshot at
http://nagiosplug.sf.net/snapshot.

This call with autoclose in 7 days if no updates are applied.

Ton

----------------------------------------------------------------------

Comment By: Jason Kau (bubbafat)
Date: 2006-05-12 07:25

Message:
Logged In: YES 
user_id=1495257

Same thing happens on Solaris 7 with gcc version egcs-
2.91.66 19990314 (egcs-1.1.2 release).

source='check_smtp.c' object='check_smtp.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/ksh ../depcomp \
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -
DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl   -
I/usr/local/include  -I/usr/local/include -Wall -g -O2 -c 
check_smtp.c
check_smtp.c: In function `main':
check_smtp.c:179: warning: implicit declaration of function 
`gethostbyname'
check_smtp.c:179: warning: assignment makes pointer from 
integer without a cast
check_smtp.c:181: dereferencing pointer to incomplete type
make[3]: *** [check_smtp.o] Error 1
make[3]: Leaving directory `/home/jkau/build/nagios-
plugins/nagios-plugins-1.4.3/plugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jkau/build/nagios-
plugins/nagios-plugins-1.4.3/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jkau/build/nagios-
plugins/nagios-plugins-1.4.3'
make: *** [all] Error 2

A lame fix is:

--- nagios-plugins-1.4.3/plugins/check_smtp.c   Wed Nov  2 
03:47:26 2005
+++ nagios-plugins-1.4.3m/plugins/check_smtp.c   Mon Apr 24 
22:52:01 2006
@@ -26,6 +26,7 @@
 #include "common.h"
 #include "netutils.h"
 #include "utils.h"
+#include <netdb.h>

 #ifdef HAVE_SSL
 int check_cert = FALSE;

However, on Solaris 8 with gcc version 3.3.2, this is not 
needed.  netdb.h gets included somehow.  Haven't been able 
to trace it down.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1484822&group_id=29880




More information about the Devel mailing list