Diff below fixes sysutils/syslog-ng build with json-c 0.13. Build tested
OK with both json-c 0.12 and json-c 0.13.

Maintainer responded with "That looks fine, but I did not test it."

OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/syslog-ng/Makefile,v
retrieving revision 1.62
diff -u -p -r1.62 Makefile
--- Makefile    11 Jan 2018 19:27:11 -0000      1.62
+++ Makefile    12 Feb 2018 06:32:00 -0000
@@ -6,7 +6,7 @@ V =             3.12.1
 REL =          3.12
 DISTNAME =     syslog-ng-$V
 CATEGORIES =   sysutils
-REVISION =     3
+REVISION =     4
 
 MAINTAINER =   Steven Mestdagh <ste...@openbsd.org>
 
Index: patches/patch-modules_json_json-parser_c
===================================================================
RCS file: patches/patch-modules_json_json-parser_c
diff -N patches/patch-modules_json_json-parser_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-modules_json_json-parser_c    12 Feb 2018 06:32:00 -0000
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+Fix build with json-c 0.13.
+https://github.com/balabit/syslog-ng/pull/1810
+
+Index: modules/json/json-parser.c
+--- modules/json/json-parser.c.orig
++++ modules/json/json-parser.c
+@@ -20,6 +20,8 @@
+  * COPYING for details.
+  */
+ 
++#define JSON_C_VER_013 (13 << 8)
++
+ #include "json-parser.h"
+ #include "dot-notation.h"
+ #include "scratch-buffers.h"
+@@ -28,7 +30,10 @@
+ #include <ctype.h>
+ 
+ #include <json.h>
++
++#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
+ #include <json_object_private.h>
++#endif
+ 
+ typedef struct _JSONParser
+ {

Reply via email to