Package: syslog-ng-incubator / 0.5.0-4

grok_support_syslog-ng_3.8.patch Patch series | download
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
From f68c3f5910c7c8a7f34a22f52de968d9d1dc375b Mon Sep 17 00:00:00 2001
From: Laszlo Varady <laszlo.varady@balabit.com>
Date: Wed, 28 Sep 2016 21:47:31 +0000
Subject: [PATCH] grok: support syslog-ng 3.8

Signed-off-by: Laszlo Varady <laszlo.varady@balabit.com>
---
 modules/grok/grok-parser-plugin.c | 2 +-
 modules/grok/grok-parser.c        | 6 ++++--
 modules/grok/grok-parser.h        | 1 +
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/grok/grok-parser-plugin.c b/modules/grok/grok-parser-plugin.c
index 43478bb..080f0e3 100644
--- a/modules/grok/grok-parser-plugin.c
+++ b/modules/grok/grok-parser-plugin.c
@@ -46,7 +46,7 @@ grok_module_init(GlobalConfig *cfg, CfgArgs *args G_GNUC_UNUSED)
 const ModuleInfo module_info =
 {
   .canonical_name = "grok",
-  .version = VERSION,
+  .version = SYSLOG_NG_VERSION,
   .description = "Experimental grok parser.",
   .core_revision = VERSION_CURRENT_VER_ONLY,
   .plugins = &grok_plugin,
diff --git a/modules/grok/grok-parser.c b/modules/grok/grok-parser.c
index a09859c..4e4f234 100644
--- a/modules/grok/grok-parser.c
+++ b/modules/grok/grok-parser.c
@@ -25,6 +25,7 @@
 #include <grok.h>
 #include <grok_pattern.h>
 #include "scratch-buffers.h"
+#include "string-list.h"
 
 #define KEY_BUFFER_LENGTH 1024
 
@@ -55,7 +56,8 @@ typedef struct _GrokParser
   gboolean debug;
 } GrokParser;
 
-GrokInstance *grok_instance_new()
+GrokInstance *
+grok_instance_new(void)
 {
   return g_new0(GrokInstance, 1);
 }
@@ -364,7 +366,7 @@ grok_parser_clone(LogPipe *s)
 {
   GrokParser *self = (GrokParser *)s;
 
-  GrokParser *cloned = grok_parser_new ( log_pipe_get_config(&self->super.super) );
+  GrokParser *cloned = (GrokParser *) grok_parser_new(log_pipe_get_config(&self->super.super));
   cloned->instances = grok_parser_clone_instances(self);
   cloned->custom_patterns = grok_parser_clone_custom_patterns(self);
   
diff --git a/modules/grok/grok-parser.h b/modules/grok/grok-parser.h
index c30148f..549bebe 100644
--- a/modules/grok/grok-parser.h
+++ b/modules/grok/grok-parser.h
@@ -28,6 +28,7 @@
 
 typedef struct _GrokInstance GrokInstance;
 
+GrokInstance *grok_instance_new(void);
 LogParser *grok_parser_new(GlobalConfig *cfg);
 
 void grok_instance_set_pattern (GrokInstance *s, gchar *pattern);