From 45918fecede9b1f6185e956ff9b72ec2db6043b5 Mon Sep 17 00:00:00 2001 From: David Adrian Date: Fri, 4 Oct 2013 11:59:41 -0400 Subject: [PATCH] Fix JSON build errors Updated module_json.c to use field_t.value as a union, not as a pointer. --- src/output_modules/module_json.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output_modules/module_json.c b/src/output_modules/module_json.c index 096540c..594b54c 100644 --- a/src/output_modules/module_json.c +++ b/src/output_modules/module_json.c @@ -149,13 +149,13 @@ int json_output_file_ip(fieldset_t *fs) field_t *f = &(fs->fields[i]); if (f->type == FS_STRING) { json_object_object_add(obj, f->name, - json_object_new_string((char*) f->value)); + json_object_new_string((char *) f->value.ptr)); } else if (f->type == FS_UINT64) { json_object_object_add(obj, f->name, - json_object_new_int((int) f->value)); + json_object_new_int((int) f->value.num)); } else if (f->type == FS_BINARY) { json_output_file_store_data(obj, - (const u_char*) f->value, f->len); + (const u_char*) f->value.ptr, f->len); } else if (f->type == FS_NULL) { // do nothing } else {