File warn.diff of Package ganglia-monitor-core

--- configure.in
+++ configure.in
@@ -280,7 +280,7 @@
 dnl ##################################################################
 dnl Check for function prototypes in headers.
 dnl
-AC_CHECK_FUNCS(getopt_long inet_ntop)
+AC_CHECK_FUNCS(getopt_long inet_ntop strdup)
 dnl AC_CHECK_FUNC(getopt_long)
 dnl AC_CHECK_FUNC(pthread_rwlock_rdlock,
 dnl   [AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1)])
--- gmetad/conf.c
+++ gmetad/conf.c
@@ -2,6 +2,7 @@
 #include <string.h>
 #include <ganglia/hash.h>
 #include <ganglia/llist.h>
+#include <ganglia/my_inet_ntop.h>
 #include <gmetad.h>
 #include <ganglia.h>
 #include "conf.h"
@@ -219,7 +220,7 @@
 static FUNC_ERRORHANDLER(errorhandler)
 {
    err_quit("gmetad config file error: %s\n", msg);
-   return NULL;
+   return 0;
 }
 
 static configoption_t gmetad_options[] =
--- gmetad/server.c
+++ gmetad/server.c
@@ -1,5 +1,8 @@
 #include <pthread.h>
+#include <unistd.h>
+#include <time.h>
 #include <ganglia/llist.h>
+#include <ganglia/my_inet_ntop.h>
 #include <stdarg.h>
 #include "dtd.h"
 #include "gmetad.h"
--- gmetric/gmetric.c
+++ gmetric/gmetric.c
@@ -2,6 +2,7 @@
 #include <interface.h>
 #include <ganglia.h>
 #include <ganglia/hash.h>
+#include <ganglia/file.h>
 #include "metric_typedefs.h"
 #include "node_data_t.h"
 #include "cmdline.h"
--- lib/dotconf.c
+++ lib/dotconf.c
@@ -506,7 +506,7 @@
 		signed char *cp = args;
 
 		/* check if it's a here-document and act accordingly */
-		skip_whitespace(&cp, (int)eob - (int)cp, 0);
+		skip_whitespace(&cp, eob - cp, 0);
 
 		if (!strncmp("<<", cp, 2)) {
 			cmd->data.str = dotconf_get_here_document(configfile, cp + 2);
@@ -605,7 +605,7 @@
 	cp1 = buffer;
 	eob = cp1 + strlen(cp1);
 
-	skip_whitespace(&cp1, (int)eob - (int)cp1, 0);
+	skip_whitespace(&cp1, eob - cp1, 0);
 
 	/* ignore comments and empty lines */
 	if (!cp1 || !*cp1 || *cp1 == '#' || *cp1 == '\n' || *cp1 == EOF)
--- lib/ganglia/file.h
+++ lib/ganglia/file.h
@@ -2,10 +2,8 @@
 #define FILE_H 1
 
 /* FreeBSD seems to gag on these.. Yet still works when not compiled in */
-#if defined(BSD)
 ssize_t readn (int fd, void *vptr, size_t n);
 ssize_t writen (int fd, const void *vptr, size_t n);
-#endif
 int slurpfile ( char * filename, char *buffer, int buflen );
 char *skip_whitespace ( const char *p);
 char *skip_token ( const char *p);
--- lib/interface.c
+++ lib/interface.c
@@ -1,5 +1,6 @@
 #include "dnet.h"
 #include <stdlib.h>
+#include <string.h>
 
 #if 0
 static int
@@ -60,7 +61,7 @@
    if (! *(struct intf_entry**)arg )
       return 0;
 
-   memcpy( *(struct intf_entry**)arg, entry, sizeof(struct intf_entry) );
+   **(struct intf_entry**)arg = *entry;
    return 0;
 }
 
@@ -91,7 +92,7 @@
    if (! *(struct intf_entry**)arg )
       return 0;
 
-   memcpy( *(struct intf_entry**)arg, entry, sizeof(struct intf_entry) );
+   **(struct intf_entry**)arg = *entry;
    return 0;
 }
openSUSE Build Service is sponsored by