Hi there,

I've made two minor changes to enable compilation from the 
5.2.1 tarball on OpenIndiana (Illumos core). The resulting 
code was tested on Nexenta, OpenSolaris and OpenIndiana 
(all x86 SunOs/Solaris 5.11 derivatives).

Cheers

Funs
diff -pur collectd-5.2.1/src/collectd-tg.c collectd-5.2.1-patched/src/collectd-tg.c
--- collectd-5.2.1/src/collectd-tg.c	2013-01-27 14:47:18.246255910 +0100
+++ collectd-5.2.1-patched/src/collectd-tg.c	2013-02-03 18:36:04.992636706 +0100
@@ -39,9 +39,18 @@
 # define __attribute__(x) /**/
 #endif
 
+#if KERNEL_SOLARIS
+#define _XPG4_2 /* for stdlib */
+#define _XPG5 /* for stdio */
+#endif
 #include <stdlib.h>
-#include <unistd.h>
 #include <stdio.h>
+#if KERNEL_SOLARIS
+#undef _XPG4_2 
+#undef _XPG5 
+#endif
+
+#include <unistd.h>
 #include <string.h>
 #include <time.h>
 #include <signal.h>
Only in collectd-5.2.1/src/libcollectdclient/collectd: lcc_features.h
diff -pur collectd-5.2.1/src/libcollectdclient/network_buffer.c collectd-5.2.1-patched/src/libcollectdclient/network_buffer.c
--- collectd-5.2.1/src/libcollectdclient/network_buffer.c	2013-01-27 14:47:18.246255910 +0100
+++ collectd-5.2.1-patched/src/libcollectdclient/network_buffer.c	2013-02-03 17:03:14.916024745 +0100
@@ -146,6 +146,7 @@ static _Bool have_gcrypt (void) /* {{{ *
 #endif
 } /* }}} _Bool have_gcrypt */
 
+#if !KERNEL_SOLARIS
 static uint64_t htonll (uint64_t val) /* {{{ */
 {
   static int config = 0;
@@ -175,6 +176,7 @@ static uint64_t htonll (uint64_t val) /*
 
   return ((((uint64_t) lo) << 32) | ((uint64_t) hi));
 } /* }}} uint64_t htonll */
+#endif
 
 static double htond (double val) /* {{{ */
 {
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to