summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-26 16:03:27 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-26 16:03:27 +0200
commitdc4db17f51cc6d88af10a6155292ea53180a8e66 (patch)
treeae1a007713ed2bace76e4560bf20adbb84be4c73 /runtime/msg.c
parentefa8dfb47da3ea46f06ab561aeb82ef1d6c3ee93 (diff)
parent620d0448171378748495f495b6db7b67686cdf49 (diff)
downloadrsyslog-dc4db17f51cc6d88af10a6155292ea53180a8e66.tar.gz
rsyslog-dc4db17f51cc6d88af10a6155292ea53180a8e66.tar.bz2
rsyslog-dc4db17f51cc6d88af10a6155292ea53180a8e66.zip
Merge branch 'master-var-refactor' into master-ruleeng
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c8
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);