Do not treat as an umbrella header for The two are distinct on GNU/Linux. Also add missing #include in some files. Index: kbuild-0.1.9998svn3427/src/sed/lib/getline.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/lib/getline.c +++ kbuild-0.1.9998svn3427/src/sed/lib/getline.c @@ -9,10 +9,10 @@ #include #undef getline /* bird */ +#include + #ifdef HAVE_STRINGS_H # include -#else -# include #endif /* HAVE_STRINGS_H */ #ifdef HAVE_STDLIB_H Index: kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/lib/mkstemp.c +++ kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c @@ -2,10 +2,10 @@ #include "config.h" #endif +#include + #ifdef HAVE_STRINGS_H # include -#else -# include #endif /* HAVE_STRINGS_H */ #ifdef HAVE_STDLIB_H Index: kbuild-0.1.9998svn3427/src/sed/lib/utils.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/lib/utils.c +++ kbuild-0.1.9998svn3427/src/sed/lib/utils.c @@ -19,16 +19,17 @@ #include "config.h" #include +#include #include #ifndef errno extern int errno; #endif +#include + #ifdef HAVE_STRINGS_H # include -#else -# include #endif /* HAVE_STRINGS_H */ #ifdef HAVE_STDLIB_H Index: kbuild-0.1.9998svn3427/src/sed/sed/compile.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/compile.c +++ kbuild-0.1.9998svn3427/src/sed/sed/compile.c @@ -22,14 +22,13 @@ #include "strverscmp.h" #include #include +#include #ifdef HAVE_STRINGS_H # include # ifdef HAVE_MEMORY_H # include # endif -#else -# include #endif /* HAVE_STRINGS_H */ #ifdef HAVE_STDLIB_H Index: kbuild-0.1.9998svn3427/src/sed/sed/execute.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/execute.c +++ kbuild-0.1.9998svn3427/src/sed/sed/execute.c @@ -24,6 +24,7 @@ #include #include +#include #include #ifndef errno @@ -46,8 +47,6 @@ extern int errno; #ifdef HAVE_STRINGS_H # include -#else -# include #endif /*HAVE_STRINGS_H*/ #ifdef HAVE_MEMORY_H # include Index: kbuild-0.1.9998svn3427/src/sed/sed/fmt.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/fmt.c +++ kbuild-0.1.9998svn3427/src/sed/sed/fmt.c @@ -22,6 +22,7 @@ #include #include #include +#include #if HAVE_LIMITS_H # include Index: kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/mbcs.c +++ kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c @@ -17,6 +17,7 @@ #include "sed.h" #include +#include int mb_cur_max; Index: kbuild-0.1.9998svn3427/src/sed/sed/regexp.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/regexp.c +++ kbuild-0.1.9998svn3427/src/sed/sed/regexp.c @@ -19,6 +19,7 @@ #include #include +#include #ifdef HAVE_STDLIB_H # include #endif Index: kbuild-0.1.9998svn3427/src/sed/sed/sed.c =================================================================== --- kbuild-0.1.9998svn3427.orig/src/sed/sed/sed.c +++ kbuild-0.1.9998svn3427/src/sed/sed/sed.c @@ -22,12 +22,10 @@ #include "sed.h" - #include +#include #ifdef HAVE_STRINGS_H # include -#else -# include #endif /*HAVE_STRINGS_H*/ #ifdef HAVE_MEMORY_H # include