1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
diff --git a/Makefile.am b/Makefile.am
index ed3b54b..c0093d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ lmtcpsrv_la_SOURCES = \
tcps_sess.h \
tcpsrv.c \
tcpsrv.h
-lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
lmtcpsrv_la_LDFLAGS = -module -avoid-version
lmtcpsrv_la_LIBADD =
diff --git a/action.c b/action.c
index 259fb66..6b52d70 100644
--- a/action.c
+++ b/action.c
@@ -98,7 +98,7 @@
#include <strings.h>
#include <time.h>
#include <errno.h>
-#include <json/json.h>
+#include <json.h>
#include "dirty.h"
#include "template.h"
diff --git a/config.h.in b/config.h.in
index 3682381..8c504b5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -349,9 +349,6 @@
/* Defined if debug mode is disabled. */
#undef NDEBUG
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Indicator for a BSD OS */
#undef OS_BSD
diff --git a/configure.ac b/configure.ac
index bb0de0c..acf2cbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ PKG_PROG_PKG_CONFIG
# modules we require
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.5)
-PKG_CHECK_MODULES([JSON_C], [json])
+PKG_CHECK_MODULES([JSON_C], [json-c])
case "${host}" in
*-*-linux*)
diff --git a/grammar/Makefile.am b/grammar/Makefile.am
index d231bb4..b5476e7 100644
--- a/grammar/Makefile.am
+++ b/grammar/Makefile.am
@@ -11,7 +11,7 @@ libgrammar_la_SOURCES = \
rainerscript.h \
parserif.h \
grammar.h
-libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS)
+libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
#testdriver_SOURCES = testdriver.c libgrammar.la
#testdriver_CPPFLAGS = $(RSRT_CFLAGS)
diff --git a/plugins/imdiag/Makefile.am b/plugins/imdiag/Makefile.am
index 33e86e9..b8d21ae 100644
--- a/plugins/imdiag/Makefile.am
+++ b/plugins/imdiag/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = imdiag.la
imdiag_la_SOURCES = imdiag.c
-imdiag_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imdiag_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imdiag_la_LDFLAGS = -module -avoid-version
imdiag_la_LIBADD =
diff --git a/plugins/imfile/Makefile.am b/plugins/imfile/Makefile.am
index 551639b..3c70868 100644
--- a/plugins/imfile/Makefile.am
+++ b/plugins/imfile/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = imfile.la
imfile_la_SOURCES = imfile.c
-imfile_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imfile_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imfile_la_LDFLAGS = -module -avoid-version
imfile_la_LIBADD =
diff --git a/plugins/imklog/Makefile.am b/plugins/imklog/Makefile.am
index 7d0d37c..ae84737 100644
--- a/plugins/imklog/Makefile.am
+++ b/plugins/imklog/Makefile.am
@@ -10,6 +10,6 @@ if ENABLE_IMKLOG_LINUX
imklog_la_SOURCES += bsd.c
endif
-imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imklog_la_LDFLAGS = -module -avoid-version
imklog_la_LIBADD =
diff --git a/plugins/immark/Makefile.am b/plugins/immark/Makefile.am
index 6d8ed24..782dacc 100644
--- a/plugins/immark/Makefile.am
+++ b/plugins/immark/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = immark.la
immark_la_SOURCES = immark.c immark.h
-immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS)
+immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
immark_la_LDFLAGS = -module -avoid-version
immark_la_LIBADD =
diff --git a/plugins/imtcp/Makefile.am b/plugins/imtcp/Makefile.am
index 2665353..24ec856 100644
--- a/plugins/imtcp/Makefile.am
+++ b/plugins/imtcp/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = imtcp.la
imtcp_la_SOURCES = imtcp.c
-imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imtcp_la_LDFLAGS = -module -avoid-version
imtcp_la_LIBADD =
diff --git a/plugins/imudp/Makefile.am b/plugins/imudp/Makefile.am
index bc64b8c..8409f86 100644
--- a/plugins/imudp/Makefile.am
+++ b/plugins/imudp/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = imudp.la
imudp_la_SOURCES = imudp.c
-imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imudp_la_LDFLAGS = -module -avoid-version
imudp_la_LIBADD = $(IMUDP_LIBS)
diff --git a/plugins/imuxsock/Makefile.am b/plugins/imuxsock/Makefile.am
index 28f9f9e..3db3a58 100644
--- a/plugins/imuxsock/Makefile.am
+++ b/plugins/imuxsock/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = imuxsock.la
imuxsock_la_SOURCES = imuxsock.c
-imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
imuxsock_la_LDFLAGS = -module -avoid-version
imuxsock_la_LIBADD = $(RSRT_LIBS)
diff --git a/plugins/ommail/Makefile.am b/plugins/ommail/Makefile.am
index 97c9296..6a178e0 100644
--- a/plugins/ommail/Makefile.am
+++ b/plugins/ommail/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = ommail.la
ommail_la_SOURCES = ommail.c
-ommail_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+ommail_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
ommail_la_LDFLAGS = -module -avoid-version
ommail_la_LIBADD =
diff --git a/plugins/ommysql/Makefile.am b/plugins/ommysql/Makefile.am
index e253b9d..f2336d0 100644
--- a/plugins/ommysql/Makefile.am
+++ b/plugins/ommysql/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = ommysql.la
ommysql_la_SOURCES = ommysql.c ommysql.h
-ommysql_la_CPPFLAGS = $(RSRT_CFLAGS) $(MYSQL_CFLAGS) $(PTHREADS_CFLAGS)
+ommysql_la_CPPFLAGS = $(RSRT_CFLAGS) $(MYSQL_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
ommysql_la_LDFLAGS = -module -avoid-version
ommysql_la_LIBADD = $(MYSQL_LIBS)
diff --git a/plugins/ompgsql/Makefile.am b/plugins/ompgsql/Makefile.am
index 607239c..664d3d1 100644
--- a/plugins/ompgsql/Makefile.am
+++ b/plugins/ompgsql/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = ompgsql.la
ompgsql_la_SOURCES = ompgsql.c ompgsql.h
-ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(PGSQL_CFLAGS) $(RSRT_CFLAGS)
+ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(PGSQL_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
ompgsql_la_LDFLAGS = -module -avoid-version
ompgsql_la_LIBADD = $(PGSQL_LIBS)
diff --git a/plugins/omprog/Makefile.am b/plugins/omprog/Makefile.am
index 63fe09b..2d7e89b 100644
--- a/plugins/omprog/Makefile.am
+++ b/plugins/omprog/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = omprog.la
omprog_la_SOURCES = omprog.c
-omprog_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
+omprog_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
omprog_la_LDFLAGS = -module -avoid-version
omprog_la_LIBADD =
diff --git a/plugins/omruleset/Makefile.am b/plugins/omruleset/Makefile.am
index fdd91a6..c927dca 100644
--- a/plugins/omruleset/Makefile.am
+++ b/plugins/omruleset/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = omruleset.la
omruleset_la_SOURCES = omruleset.c
-omruleset_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
+omruleset_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
omruleset_la_LDFLAGS = -module -avoid-version
omruleset_la_LIBADD =
diff --git a/plugins/omsnmp/Makefile.am b/plugins/omsnmp/Makefile.am
index f75fb09..12c3083 100644
--- a/plugins/omsnmp/Makefile.am
+++ b/plugins/omsnmp/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = omsnmp.la
omsnmp_la_SOURCES = omsnmp.c omsnmp.h
-omsnmp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+omsnmp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
omsnmp_la_LDFLAGS = -module -avoid-version
omsnmp_la_LIBADD = $(SNMP_LIBS)
diff --git a/plugins/omstdout/Makefile.am b/plugins/omstdout/Makefile.am
index 9f5d497..c4d9bcb 100644
--- a/plugins/omstdout/Makefile.am
+++ b/plugins/omstdout/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = omstdout.la
omstdout_la_SOURCES = omstdout.c
-omstdout_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
+omstdout_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
omstdout_la_LDFLAGS = -module -avoid-version
omstdout_la_LIBADD =
diff --git a/plugins/omtesting/Makefile.am b/plugins/omtesting/Makefile.am
index 4700e1e..2ee9017 100644
--- a/plugins/omtesting/Makefile.am
+++ b/plugins/omtesting/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = omtesting.la
omtesting_la_SOURCES = omtesting.c
-omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
omtesting_la_LDFLAGS = -module -avoid-version
omtesting_la_LIBADD =
diff --git a/plugins/omudpspoof/Makefile.am b/plugins/omudpspoof/Makefile.am
index 79c495a..ff3c213 100644
--- a/plugins/omudpspoof/Makefile.am
+++ b/plugins/omudpspoof/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = omudpspoof.la
omudpspoof_la_SOURCES = omudpspoof.c
-omudpspoof_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(UDPSPOOF_CFLAGS)
+omudpspoof_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(UDPSPOOF_CFLAGS) $(JSON_C_CFLAGS)
omudpspoof_la_LDFLAGS = -module -avoid-version
omudpspoof_la_LIBADD = $(UDPSPOOF_LIBS)
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index dea06fe..99b0022 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -97,9 +97,9 @@ librsyslog_la_SOURCES = \
#
if WITH_MODDIRS
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools
else
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
endif
#librsyslog_la_LDFLAGS = -module -avoid-version
librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS)
@@ -148,7 +148,7 @@ lmnetstrms_la_LIBADD =
# generic stream server framework
pkglib_LTLIBRARIES += lmstrmsrv.la
lmstrmsrv_la_SOURCES = strmsrv.c strmsrv.h strms_sess.c strms_sess.h
-lmstrmsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+lmstrmsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
lmstrmsrv_la_LDFLAGS = -module -avoid-version
lmstrmsrv_la_LIBADD =
@@ -159,7 +159,7 @@ pkglib_LTLIBRARIES += lmnsd_ptcp.la
lmnsd_ptcp_la_SOURCES = nsd_ptcp.c nsd_ptcp.h \
nsdsel_ptcp.c nsdsel_ptcp.h \
nsdpoll_ptcp.c nsdpoll_ptcp.h
-lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
lmnsd_ptcp_la_LDFLAGS = -module -avoid-version
lmnsd_ptcp_la_LIBADD =
endif # if ENABLE_INET
@@ -181,10 +181,10 @@ endif
if ENABLE_LIBGCRYPT
noinst_LTLIBRARIES += libgcry.la
libgcry_la_SOURCES = libgcry.c libgcry_common.c libgcry.h
- libgcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
+ libgcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS) $(JSON_C_CFLAGS)
pkglib_LTLIBRARIES += lmcry_gcry.la
lmcry_gcry_la_SOURCES = lmcry_gcry.c lmcry_gcry.h
- lmcry_gcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
+ lmcry_gcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS) $(JSON_C_CFLAGS)
lmcry_gcry_la_LDFLAGS = -module -avoid-version
lmcry_gcry_la_LIBADD = libgcry.la $(LIBGCRYPT_LIBS)
endif
diff --git a/runtime/msg.c b/runtime/msg.c
index a5c5281..4ca104e 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -41,9 +41,7 @@
#endif
#include <netdb.h>
#include <libestr.h>
-#include <json/json.h>
-/* For struct json_object_iter, should not be necessary in future versions */
-#include <json/json_object_private.h>
+#include <json.h>
#if HAVE_MALLOC_H
# include <malloc.h>
#endif
diff --git a/runtime/msg.h b/runtime/msg.h
index 6faf066..ac220b6 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -30,7 +30,7 @@
#include <pthread.h>
#include <libestr.h>
-#include <json/json.h>
+#include <json.h>
#include "obj.h"
#include "syslogd-types.h"
#include "template.h"
diff --git a/template.c b/template.c
index b675255..9cefa05 100644
--- a/template.c
+++ b/template.c
@@ -34,7 +34,7 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
-#include <json/json.h>
+#include <json.h>
#include "stringbuf.h"
#include "syslogd-types.h"
#include "template.h"
diff --git a/template.h b/template.h
index 318db6f..87a1c77 100644
--- a/template.h
+++ b/template.h
@@ -30,7 +30,7 @@
#ifndef TEMPLATE_H_INCLUDED
#define TEMPLATE_H_INCLUDED 1
-#include <json/json.h>
+#include <json.h>
#include <libestr.h>
#include "regexp.h"
#include "stringbuf.h"
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 6832494..76c13cc 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -38,7 +38,7 @@ rsyslogd_SOURCES = \
pidfile.h \
\
../dirty.h
-rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
# note: it looks like librsyslog.la must be explicitely given on LDDADD,
# otherwise dependencies are not properly calculated (resulting in a
# potentially incomplete build, a problem we had several times...)
|