From ef304f14b38a40531af4abd5cd4703cb3483be88 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 27 Mar 2011 01:39:39 +0100 Subject: ftw.c: errno.h has to be included before undefining _LIBC While, cleanup a bit Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/ftw/ftw.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c index 9031e3589..20ff4f02b 100644 --- a/libc/misc/ftw/ftw.c +++ b/libc/misc/ftw/ftw.c @@ -23,6 +23,8 @@ #endif #include +/* need errno.h before undefining _LIBC */ +#include #ifdef __UCLIBC__ #undef _LIBC #define HAVE_DIRENT_H 1 @@ -32,6 +34,7 @@ #endif #if __GNUC__ +# undef alloca # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H @@ -67,7 +70,6 @@ char *alloca (); # endif #endif -#include #include #include #include @@ -77,11 +79,7 @@ char *alloca (); #if HAVE_SYS_PARAM_H || defined _LIBC # include #endif -#ifdef _LIBC -# include -#else -# include -#endif +#include #if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy char *stpcpy (); -- cgit v1.2.3