Xymon Mailing List Archive search

4.3.0 beta3 compile problem on solaris 10 sparc

list Henrik Størner
Wed, 17 Nov 2010 11:03:15 +0000 (UTC)
Message-Id: <ic0cpj$9kf$user-e356fad9864f@xymon.invalid>

In <AANLkTimHMG282n=user-819948e26dc9@xymon.invalid> Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> writes:
On Tue, Nov 16, 2010 at 8:32 PM, Roland Soderstrom <
user-0cec9512a49f@xymon.invalid> wrote:
Can't compile on Solaris 10 sparc with LDAP disabled.
I disable LDAP test, SSL tests as I have no ldap server or SSL services.
<snip>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
-I/var/tmp/xymon-4.3.0.beta3/include -I/usr/local/include   -c -o ldaptest.o
ldaptest.c
ldaptest.c: In function `add_ldap_test':
ldaptest.c:99: error: `badurl' undeclared (first use in this function)
ldaptest.c:99: error: (Each undeclared identifier is reported only once
ldaptest.c:99: error: for each function it appears in.)
ldaptest.c:101: error: `req' undeclared (first use in this function)
ldaptest.c:112: error: `basecheck' undeclared (first use in this function)
make[1]: *** [ldaptest.o] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.0.beta3/xymonnet'
make: *** [xymonnet-build] Error 2
Line 99 is outside the closing #ifdef.  Moving the #endif  down to line 118
effectively comments out the entire function body.  I don't know if that's
the correct fix., but at least it compiles...
It looks like the right fix.

Index: xymonnet/ldaptest.c
===================================================================
--- xymonnet/ldaptest.c	(revision 6590)
+++ xymonnet/ldaptest.c	(working copy)
@@ -94,7 +94,6 @@
 	req->certinfo = NULL;
 	req->certexpires = 0;
 	req->skiptest = 0;
-#endif
 
 	if (badurl) {
 		errprintf("Invalid LDAP URL %s\n", t->testspec);
@@ -116,6 +115,8 @@
 		req->output = "Cannot connect to server";
 	}
 
+#endif
• return 0;
 }
 

Regards,
Henrik