47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
From 6b47dd542d07ed557f02af9970d1004eb262e1c1 Mon Sep 17 00:00:00 2001
|
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
|
Date: Tue, 19 Aug 2014 11:33:41 +0200
|
|
Subject: [PATCH] bugfix: build failure on systems which don't have
|
|
json_tokener_errors
|
|
|
|
Older versions of json-c need to use a different API (which don't exists
|
|
on newer versions, unfortunately...)
|
|
Thanks to Thomas D. for reporting this problem.
|
|
---
|
|
ChangeLog | 6 ++++++
|
|
runtime/msg.c | 6 +++++-
|
|
2 files changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index 177387d..cb09b6c 100644
|
|
--- ChangeLog
|
|
+++ ChangeLog
|
|
@@ -1,4 +1,10 @@
|
|
---------------------------------------------------------------------------
|
|
+Version 8.4.1 [v8-stable] 2014-08-??
|
|
+- bugfix: build failure on systems which don't have json_tokener_errors
|
|
+ Older versions of json-c need to use a different API (which don't exists
|
|
+ on newer versions, unfortunately...)
|
|
+ Thanks to Thomas D. for reporting this problem.
|
|
+---------------------------------------------------------------------------
|
|
Version 8.4.0 [v8-stable] 2014-08-18
|
|
- this is the new stable branch, which incorporates all enhancements of
|
|
rsyslog 8.3.
|
|
diff --git a/runtime/msg.c b/runtime/msg.c
|
|
index 66c3b7b..81b13f9 100644
|
|
--- runtime/msg.c
|
|
+++ runtime/msg.c
|
|
@@ -4074,7 +4074,11 @@ MsgSetPropsViaJSON(msg_t *__restrict__ const pMsg, const uchar *__restrict__ con
|
|
|
|
err = tokener->err;
|
|
if(err != json_tokener_continue)
|
|
- errMsg = json_tokener_errors[err];
|
|
+# if HAVE_JSON_TOKENER_ERROR_DESC
|
|
+ errMsg = json_tokener_error_desc(err);
|
|
+# else
|
|
+ errMsg = json_tokener_errors[err];
|
|
+# endif
|
|
else
|
|
errMsg = "Unterminated input";
|
|
} else if(!json_object_is_type(json, json_type_object))
|