diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-26 15:46:18 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-26 15:46:18 +0200 |
commit | 0088c275da85e49005a2294335fb3365583d2bb9 (patch) | |
tree | 1e7b9eedf571651ad27c2337b64eb8f5e6b51c3f /runtime/msg.c | |
parent | 8b50bdbee90d9bd00a78e776d5ade60d085c0823 (diff) | |
parent | 4acf8e361aa68b3e753611c7c7e607c04dfd8d1a (diff) | |
download | rsyslog-0088c275da85e49005a2294335fb3365583d2bb9.tar.gz rsyslog-0088c275da85e49005a2294335fb3365583d2bb9.tar.bz2 rsyslog-0088c275da85e49005a2294335fb3365583d2bb9.zip |
Merge branch 'master' into master-var-refactor
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index f634329f..907000c4 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -4048,7 +4048,11 @@ jsonDeepCopy(struct json_object *src) dst = json_object_new_double(json_object_get_double(src)); break; case json_type_int: +#ifdef HAVE_JSON_OBJECT_NEW_INT64 + dst = json_object_new_int64(json_object_get_int64(src)); +#else /* HAVE_JSON_OBJECT_NEW_INT64 */ dst = json_object_new_int(json_object_get_int(src)); +#endif /* HAVE_JSON_OBJECT_NEW_INT64 */ break; case json_type_string: dst = json_object_new_string(json_object_get_string(src)); @@ -4091,7 +4095,11 @@ msgSetJSONFromVar(msg_t *pMsg, uchar *varname, struct var *v) free(cstr); break; case 'N':/* number (integer) */ +#ifdef HAVE_JSON_OBJECT_NEW_INT64 + json = json_object_new_int64(v->d.n); +#else /* HAVE_JSON_OBJECT_NEW_INT64 */ json = json_object_new_int((int) v->d.n); +#endif /* HAVE_JSON_OBJECT_NEW_INT64 */ break; case 'J':/* native JSON */ json = jsonDeepCopy(v->d.json); |