From: Pavel Rochnyack Date: Tue, 19 Jun 2018 08:43:05 +0000 (+0700) Subject: snmp_agent: Try to fix tests X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=52c1dc1c9da2db76bc00d0de8fb2fe47c74b844f;p=collectd.git snmp_agent: Try to fix tests This adressed to fix Solaris 10 builds. Closes: #2814 --- diff --git a/src/snmp_agent_test.c b/src/snmp_agent_test.c index 20537dda..bd500fce 100644 --- a/src/snmp_agent_test.c +++ b/src/snmp_agent_test.c @@ -663,9 +663,15 @@ DEF_TEST(get_token) { } DEF_TEST(tokenize) { - regmatch_t m[3] = {{(regoff_t)5, (regoff_t)6}, /* "1" */ - {(regoff_t)12, (regoff_t)13}, /* "2" */ - {(regoff_t)19, (regoff_t)20}}; /* "3" */ + regmatch_t m[3]; + + m[0].rm_so = 5; + m[0].rm_eo = 6; + m[1].rm_so = 12; + m[1].rm_eo = 13; + m[2].rm_so = 19; + m[2].rm_eo = 20; + c_avl_tree_t *tokens = c_avl_create((int (*)(const void *, const void *))num_compare); const char input[] = "testA1-testB2-testC3";