Xymon Mailing List Archive search

Current snapshot - compilation error

3 messages in this thread

list Alexandre Levin · Thu, 13 Mar 2008 22:09:26 -0700 ·
OS: FreeBSD 7

Error:

	....
	In file included from do_rrd.c:517:
	rrd/do_memory.c:24: error: static declaration of
'string_compare' follows non-static declaration
	/w1/src/hobbit/hobbit/snapshot/include/../lib/rbtr.h:70: error:
previous declaration of 'string_compare' was here
	In file included from do_rrd.c:520:
	rrd/do_netstat.c: In function 'do_netstat_rrd':
	.....

Can be fixed by removing static int string_compare in
hobbitd/rrd/do_memory.c :

	
===================================================================
	--- hobbitd/rrd/do_memory.c     (revision 7646)
	+++ hobbitd/rrd/do_memory.c     (working copy)
	@@ -21,10 +21,12 @@
	  */
	 RbtHandle memhosts;
	 int memhosts_init = 0;
	-static int string_compare(void *a, void *b) {
	+/*
	+static int string_compare(void *a, void *b)
	+{
	        return strcmp((char *)a, (char *)b);
	 }
	• +*/
	 static int get_mem_percent(char *l)
	 {
	        char *p;
	
======================================================================

Alexandre Levin
list Lars Ebeling · Fri, 14 Mar 2008 06:57:12 +0100 ·
No problems in HP-UX 11.11 and gcc 3.4.2

Lars
quoted from Alexandre Levin

----- Original Message ----- 
From: "Levin, Alexandre" <user-3ad6817ba49e@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Friday, March 14, 2008 6:09 AM
Subject: [hobbit] Current snapshot - compilation error


OS: FreeBSD 7

Error:

....
In file included from do_rrd.c:517:
rrd/do_memory.c:24: error: static declaration of
'string_compare' follows non-static declaration
/w1/src/hobbit/hobbit/snapshot/include/../lib/rbtr.h:70: error:
previous declaration of 'string_compare' was here
In file included from do_rrd.c:520:
rrd/do_netstat.c: In function 'do_netstat_rrd':
list Henrik Størner · Fri, 14 Mar 2008 07:30:44 +0100 ·
quoted from Lars Ebeling
On Thu, Mar 13, 2008 at 10:09:26PM -0700, Levin, Alexandre wrote:
	In file included from do_rrd.c:517:
	rrd/do_memory.c:24: error: static declaration of
'string_compare' follows non-static declaration
Thanks, fixed.


Regards,
Henrik