fix sysutils/rsyslog when building with jsonc 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/rsyslog when building with jsonc 0.13

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

Re: fix sysutils/rsyslog when building with jsonc 0.13

Björn Ketelaars
On Sun 11/02/2018 17:27, Björn Ketelaars wrote:
> The diff below fixes building with jsonc 0.13, while building with 0.12
> still works.


Ping...OK?

Reply | Threaded
Open this post in threaded view
|

Re: fix sysutils/rsyslog when building with jsonc 0.13

Stuart Henderson
In reply to this post by Björn Ketelaars
On 2018/02/11 17:27, Björn Ketelaars wrote:
> The diff below fixes building with jsonc 0.13, while building with 0.12
> still works.
>
> Comments?

ok.

you could skip the REVISION bump here if wanted because it doesn't change
things for in-tree json-c, and when the future json-c update comes in,
updates will be forced anyway because the library version changes.
that said, it doesn't hurt.