X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcurl_json.c;fp=src%2Fcurl_json.c;h=181f18bbbf29f0310ace456b99c4b2920b689673;hb=17e1d8131433d5c737a568c9e85df735c6bcd7b0;hp=6b50b454de1f231f24a3a4a0890693faaee063e5;hpb=307bf74a8cef765fcd5d788f6aad5b2e9bdf670b;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index 6b50b454..181f18bb 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -946,9 +946,13 @@ static int cj_read(user_data_t *ud) /* {{{ */ db->depth = 0; memset(&db->state, 0, sizeof(db->state)); - db->state[0].entry = &(cj_tree_entry_t){ - .type = TREE, .tree = db->tree, - }; + + /* This is not a compound literal because EPEL6's GCC is not cool enough to + * handle anonymous unions within compound literals. */ + cj_tree_entry_t root = {0}; + root.type = TREE; + root.tree = db->tree; + db->state[0].entry = &root; int status = cj_perform(db);