--- /dev/null
+--- grok-a52f42b1fa359db2145a70216ec5b4ef43d57b5c/conf.y.orig 2020-06-02 17:16:54.505830255 +0200
++++ grok-a52f42b1fa359db2145a70216ec5b4ef43d57b5c/conf.y 2020-06-02 18:34:09.336057711 +0200
+@@ -2,10 +2,9 @@
+ #include <stdio.h>
+ #include <string.h>
+
+-#include "conf.tab.h"
+ #include "grok_config.h"
+ #include "grok_input.h"
+ #include "grok_matchconf.h"
++#include "conf.tab.h"
+
+-int yylineno;
+ void yyerror (YYLTYPE *loc, struct config *conf, char const *s) {
+@@ -49,9 +49,9 @@
+
+ %token '{' '}' ';' ':' '\n'
+
+-%pure-parser
++%define api.pure
++%define parse.error verbose
+ %parse-param {struct config *conf}
+-%error-verbose
+ %locations
+
+ %start config
+@@ -128,7 +128,7 @@
+ | match_block_statement
+
+ match_block_statement: /* empty */
+- | "pattern" ':' QUOTEDSTRING { conf_new_match_pattern(conf, $3) }
++ | "pattern" ':' QUOTEDSTRING { conf_new_match_pattern(conf, $3); }
+ | "reaction" ':' QUOTEDSTRING { CURMATCH.reaction = $3; }
+ | "reaction" ':' "none" { CURMATCH.no_reaction = 1; }
+ | "shell" ':' QUOTEDSTRING { CURMATCH.shell = $3; }
echo "We require gperf version >= 3.0.3" ; \
exit 1; \
fi
+--- grok-a52f42b1fa359db2145a70216ec5b4ef43d57b5c/grok_matchconf_macro.h.orig 2017-07-20 23:49:31.000000000 +0200
++++ grok-a52f42b1fa359db2145a70216ec5b4ef43d57b5c/grok_matchconf_macro.h 2020-06-02 17:11:27.029325821 +0200
+@@ -19,6 +19,6 @@
+ #endif
+
+ /* this function is generated by gperf */
+-const struct strmacro *patname2macro(const char *str, unsigned int len);
++const struct strmacro *patname2macro(const char *str, size_t len);
+
+ #endif /* _GROK_MATCHCONF_MACRO_ */
Source0: https://github.com/jordansissel/grok/archive/%{gitref}/%{name}-%{snap}.tar.gz
# Source0-md5: 1d09b3aa6ebac202680227faa26e742e
Patch0: %{name}-gperf.patch
+Patch1: %{name}-bison.patch
URL: https://github.com/jordansissel/grok
BuildRequires: bison
BuildRequires: flex
%prep
%setup -q -n %{name}-%{gitref}
%patch0 -p1
+%patch1 -p1
%build
%{__make} \