Files
haikuports/sys-apps/grep/patches/grep-2.12.patch
Ingo Weinhold 903e8fb7c6 Convert grep recipe to an actual recipe
* Remove the other non-recipes/patches.
* We use the bz2 source archive. The xz URL is included as a comment.
  Would be nice, if both could be specified and haikuporter would pick
  one it has an unarchiving tool for.
2013-04-29 11:37:19 +02:00

15 lines
733 B
Diff

diff -up grep-2.12/src/kwsearch.c.orig grep-2.12/src/kwsearch.c
--- grep-2.12/src/kwsearch.c.orig 2012-02-27 02:35:19.015204352 -0700
+++ grep-2.12/src/kwsearch.c 2012-05-02 22:46:36.262668288 -0600
@@ -106,8 +106,9 @@ Fexecute (char const *buf, size_t size,
/* The match was a part of multibyte character, advance at least
one byte to ensure no infinite loop happens. */
mbstate_t s;
+ size_t mb_len;
memset (&s, 0, sizeof s);
- size_t mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
+ mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
if (mb_len == (size_t) -2)
goto failure;
beg = mb_start;