aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/grok/Makefile1
-rw-r--r--sysutils/grok/files/patch-discover_main.c11
-rw-r--r--sysutils/grok/files/patch-grok_discover.c12
3 files changed, 24 insertions, 0 deletions
diff --git a/sysutils/grok/Makefile b/sysutils/grok/Makefile
index 9acddb574bca..7929ddafc946 100644
--- a/sysutils/grok/Makefile
+++ b/sysutils/grok/Makefile
@@ -2,6 +2,7 @@
PORTNAME= grok
PORTVERSION= 1.20110708.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= sysutils
MASTER_SITES= GOOGLE_CODE
diff --git a/sysutils/grok/files/patch-discover_main.c b/sysutils/grok/files/patch-discover_main.c
new file mode 100644
index 000000000000..7875f999292c
--- /dev/null
+++ b/sysutils/grok/files/patch-discover_main.c
@@ -0,0 +1,11 @@
+--- ./discover_main.c.orig 2013-10-10 13:25:59.000000000 -0400
++++ ./discover_main.c 2013-10-10 13:26:13.000000000 -0400
+@@ -33,7 +33,7 @@
+ grok_init(&grok);
+
+ int pattern_count = 0;
+- while ((opt = getopt_long_only(argc, argv, "hp:v", options, &optind)) != -1) {
++ while ((opt = getopt_long_only(argc, argv, "hp:v", options, NULL)) != -1) {
+ switch (opt) {
+ case 'h':
+ usage();
diff --git a/sysutils/grok/files/patch-grok_discover.c b/sysutils/grok/files/patch-grok_discover.c
new file mode 100644
index 000000000000..000e7c2d0707
--- /dev/null
+++ b/sysutils/grok/files/patch-grok_discover.c
@@ -0,0 +1,12 @@
+--- ./grok_discover.c.orig 2013-10-10 13:26:22.000000000 -0400
++++ ./grok_discover.c 2013-10-10 13:27:24.000000000 -0400
+@@ -187,6 +187,9 @@
+ if (first_match_endpos > 0) {
+ offset += first_match_endpos;
+ }
++ else {
++ offset += 1;
++ }
+ } else { /* We found a match, replace it in the pattern */
+ grok_log(gdt, LOG_DISCOVER, "%d: Matched %s on '%.*s'",
+ rounds, best_match.grok->pattern,