Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
I am getting these warnings when building nagios after apply the glib
chained-hash patch:
../common/objects.c:123: warning: type mismatch with previous implicit
declaration
../common/objects.c:104: warning: previous implicit declaration of
`build_config_lists'
../common/objects.c:123: warning: `build_config_lists' was previously
implicitly declared to return `int'
../common/objects.c: In function `build_config_lists':
../common/objects.c:124: warning: passing arg 2 of `g_tree_traverse'
from incompatible pointer type
../common/objects.c: In function `add_service':
../common/objects.c
incompatible pointer type
../common/statusdata.c:354: warning: type mismatch with previous
implicit declaration
../common/statusdata.c:336: warning: previous implicit declaration of
`build_lists'
../common/statusdata.c:354: warning: `build_lists' was previously
implicitly declared to return `int'
../common/statusdata.c: In function `build_lists':
../common/statusdata.c:355: warning: passing arg 2 of `g_tree_traverse'
from incompatible pointer type
Nagios seems to be run find though but I am not sure what the warnings
might mean later on. Here is the patch (same patch as an attachment if
needed):
diff -ur base/Makefile.in base/Makefile.in
--- base/Makefile.in Sun Nov 10 22:52:13 2002
+++ base/Makefile.in Mon Mar 15 18:13:37 2004
@@ -10,9 +10,9 @@
SRC_XDATA=../xdata
CC=@CC@
-CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE
+CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE `glib-config --cflags`
#CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-DHAVE_CONFIG_H -DNSCORE
-LDFLAGS=@LDFLAGS@ @LIBS@
+LDFLAGS=@LDFLAGS@ @LIBS@ `glib-config --libs`
prefix=@prefix@
exec_prefix=@exec_prefix@
diff -ur cgi/Makefile.in cgi/Makefile.in
--- cgi/Makefile.in Sun Aug 25 19:53:00 2002
+++ cgi/Makefile.in Mon Mar 15 18:14:27 2004
@@ -25,9 +25,9 @@
CP=@CP@
CC=@CC@
-CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI
+CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI `glib-config --cflags`
#CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-DHAVE_CONFIG_H -DNSCGI
-LDFLAGS=@LDFLAGS@ @LIBS@
+LDFLAGS=@LDFLAGS@ @LIBS@ `glib-config --libs`
CGIS=avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi
notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi
summary.cgi tac.cgi $(CGIEXTRAS)
diff -ur common/common.h common/common.h
--- common/common.h Mon Feb 2 23:45:08 2004
+++ common/common.h Mon Mar 15 18:14:44 2004
@@ -208,8 +208,12 @@
#define OK 0
#define ERROR -2 /* value was changed
from -1 so as to not interfere with STATUS_UNKNOWN plugin result */
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
/****************** HOST CONFIG FILE READING OPTIONS
********************/
diff -ur common/config.h.in common/config.h.in
--- common/config.h.in Sat Apr 20 16:34:02 2002
+++ common/config.h.in Mon Mar 15 18:15:01 2004
@@ -214,3 +214,7 @@
#include
#endif
+#define HAVE_GLIB_H 1
+#ifdef HAVE_GLIB_H
+#include
+#endif
diff -ur common/objects.c common/objects.c
--- common/objects.c Sat Nov 22 20:37:22 2003
+++ common/objects.c Mon Mar 15 18:22:18 2004
@@ -59,6 +59,8 @@
servicedependency *servicedependency_list=NULL;
hostdependency *hostdependency_list=NULL;
hostescalation *hostescalation_list=NULL;
+GTree *service_tree = NULL;
+GHashTable *host_hash = NULL;
@@ -99,6 +101,8 @@
printf("read_object_config_data() end\n");
#endif
+ build_config_lists();
+
return result;
}
@@ -107,6 +111,19 @@
/**************** OBJECT ADDITION FUNCTIONS ***********************/
/******************************************************************/
+int service_list_add(char *key, service
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]