The diff below fixes building with jsonc 0.13, while building with 0.12
still works.

Comments?


-- 
Björn Ketelaars
GPG key: 0x4F0E5F21


diff --git Makefile Makefile
index a1a2ba1c783..117f2f3ab84 100644
--- Makefile
+++ Makefile
@@ -14,7 +14,7 @@ PKGNAME-main =                rsyslog-$V
 PKGNAME-mysql =                rsyslog-mysql-$V
 PKGNAME-pgsql =                rsyslog-pgsql-$V
 CATEGORIES =           sysutils
-REVISION-main =                3
+REVISION-main =                4
 REVISION-mysql =       1
 REVISION-pgsql =       1
 
diff --git patches/patch-runtime_msg_c patches/patch-runtime_msg_c
new file mode 100644
index 00000000000..e785fbdf27c
--- /dev/null
+++ patches/patch-runtime_msg_c
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+Index: runtime/msg.c
+--- runtime/msg.c.orig
++++ runtime/msg.c
+@@ -27,6 +27,8 @@
+  * A copy of the GPL can be found in the file "COPYING" in this distribution.
+  * A copy of the LGPL can be found in the file "COPYING.LESSER" in this 
distribution.
+  */
++#define JSON_C_VER_013 (13 << 8)
++
+ #include "config.h"
+ #include <stdio.h>
+ #include <stdarg.h>
+@@ -43,7 +45,9 @@
+ #include <libestr.h>
+ #include <json.h>
+ /* For struct json_object_iter, should not be necessary in future versions */
++#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
+ #include <json_object_private.h>
++#endif
+ #if HAVE_MALLOC_H
+ #  include <malloc.h>
+ #endif

Reply via email to