X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils%2Fcommon%2Fcommon_test.c;h=4f15c16faeafa1230978654f2dcceeeeab4715c1;hb=9315ccb08ebd29f0b79426853c2e7adf448c26e9;hp=426082fa38322413427831dbe7bafbff5173eb65;hpb=25824c65721f0f21cadf1607fad367c7e7831816;p=collectd.git diff --git a/src/utils/common/common_test.c b/src/utils/common/common_test.c index 426082fa..4f15c16f 100644 --- a/src/utils/common/common_test.c +++ b/src/utils/common/common_test.c @@ -24,8 +24,14 @@ * Florian octo Forster */ -#include "testing.h" +// clang-format off +/* + * Explicit order is required or _FILE_OFFSET_BITS will have definition mismatches on Solaris + * See Github Issue #3193 for details + */ #include "utils/common/common.h" +#include "testing.h" +// clang-format on #if HAVE_KSTAT_H #include @@ -280,10 +286,15 @@ DEF_TEST(parse_values) { for (size_t i = 0; i < STATIC_ARRAY_SIZE(cases); i++) { data_source_t dsrc = { - .name = "value", .type = DS_TYPE_GAUGE, .min = 0.0, .max = NAN, + .name = "value", + .type = DS_TYPE_GAUGE, + .min = 0.0, + .max = NAN, }; data_set_t ds = { - .type = "example", .ds_num = 1, .ds = &dsrc, + .type = "example", + .ds_num = 1, + .ds = &dsrc, }; value_t v = { @@ -344,7 +355,8 @@ DEF_TEST(value_to_rate) { for (size_t i = 0; i < STATIC_ARRAY_SIZE(cases); i++) { cdtime_t t0 = TIME_T_TO_CDTIME_T(cases[i].t0); value_to_rate_state_t state = { - .last_value = cases[i].v0, .last_time = t0, + .last_value = cases[i].v0, + .last_time = t0, }; gauge_t got;