Work around Solaris 10 defining label_t
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 9 Aug 2016 10:57:21 +0000 (12:57 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 9 Aug 2016 10:59:52 +0000 (12:59 +0200)
Solaris 10 defines label_t in /usr/include/sys/machtypes.h,
unless POSIX_C_SOURCE is defined, or when __EXTENSIONS__ is defined.

Fixes #1301

src/utils_format_json_test.c

index 1c8a8ce..1400694 100644 (file)
  *   Florian octo Forster <octo at collectd.org>
  */
 
+/* Workaround for Solaris 10 defining label_t
+ * Issue #1301
+ */
+#if KERNEL_SOLARIS
+# ifndef _POSIX_C_SOURCE
+#  define _POSIX_C_SOURCE 200112L
+# endif
+# undef __EXTENSIONS__
+#endif
+
 #include "collectd.h"
 
 #include "testing.h"