Index: grep-2.5.4/src/search.c =================================================================== --- grep-2.5.4.orig/src/search.c +++ grep-2.5.4/src/search.c @@ -34,6 +34,8 @@ #include "system.h" #include "grep.h" #ifndef FGREP_PROGRAM +#include +#define __USE_GNU # include # include "dfa.h" #endif @@ -45,6 +47,7 @@ #endif #include "mbchar.h" + #define NCHAR (UCHAR_MAX + 1) /* For -w, we also consider _ to be word constituent. */ Index: grep-2.5.4/src/dfa.c =================================================================== --- grep-2.5.4.orig/src/dfa.c +++ grep-2.5.4/src/dfa.c @@ -120,6 +120,7 @@ extern void free(); # include #endif +#define __USE_GNU #include "regex.h" #include "dfa.h" #include "hard-locale.h"