Code

curl_json plugin: Work around a limitation in EPEL6's GCC.
[collectd.git] / src / curl_json_test.c
index 4b9846607f794e3a95c12d171fc3fccea7b69686..e8f8f6bb3a6c3a3cb8fd436890d3ee5d419b5819 100644 (file)
@@ -52,9 +52,10 @@ static cj_t *test_setup(char *json, char *key_path) {
 
   assert(cj_append_key(db, key) == 0);
 
-  db->state[0].entry = &(cj_tree_entry_t){
-      .type = TREE, .tree = db->tree,
-  };
+  cj_tree_entry_t root = {0};
+  root.type = TREE;
+  root.tree = db->tree;
+  db->state[0].entry = &root;
 
   cj_curl_callback(json, strlen(json), 1, db);
 #if HAVE_YAJL_V2