From: Ruben Kerkhof Date: Tue, 9 Aug 2016 10:57:21 +0000 (+0200) Subject: Work around Solaris 10 defining label_t X-Git-Tag: collectd-5.6.0~52^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3b264ee;p=collectd.git 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 --- 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"