From 3b264eeaf7f33d38f04d37b0d1181a9ed888e1f9 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Tue, 9 Aug 2016 12:57:21 +0200 Subject: [PATCH] Work around Solaris 10 defining label_t 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utils_format_json_test.c b/src/utils_format_json_test.c index 1c8a8cea..1400694b 100644 --- a/src/utils_format_json_test.c +++ b/src/utils_format_json_test.c @@ -24,6 +24,16 @@ * Florian octo Forster */ +/* 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" -- 2.30.2