diff -urN grep-2.6.1/src/dfa.c grep-2.6.1-haiku/src/dfa.c
--- grep-2.6.1/src/dfa.c	2010-03-25 06:28:54.056098816 -0700
+++ grep-2.6.1-haiku/src/dfa.c	2013-02-17 13:32:51.217055232 -0800
@@ -2775,6 +2775,7 @@
   unsigned char eol = eolbyte;	/* Likewise for eolbyte.  */
   static int sbit[NOTCHAR];	/* Table for anding with d->success. */
   static int sbit_init;
+  unsigned char saved_end;
 
   if (! sbit_init)
     {
@@ -2792,7 +2793,7 @@
   s = s1 = 0;
   p = (unsigned char const *) begin;
   trans = d->trans;
-  unsigned char saved_end = *(unsigned char *) end;
+  saved_end = *(unsigned char *) end;
   *end = eol;
 
 #ifdef MBS_SUPPORT
