FIX sysutils/syslog-ng build with json-c 0.13

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FIX sysutils/syslog-ng build with json-c 0.13

Björn Ketelaars
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 <[hidden email]>
 
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 | Threaded
Open this post in threaded view
|

Re: FIX sysutils/syslog-ng build with json-c 0.13

Jeremie Courreges-Anglas-2
On Mon, Feb 12 2018, Björn Ketelaars <[hidden email]> wrote:
> 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?

ok jca@

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: FIX sysutils/syslog-ng build with json-c 0.13

Landry Breuil-5
On Mon, Feb 12, 2018 at 09:34:22AM +0100, Jeremie Courreges-Anglas wrote:
> On Mon, Feb 12 2018, Björn Ketelaars <[hidden email]> wrote:
> > 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?
>
> ok jca@

ok