[git commit future 1/1] ftw.c: errno.h has to be included before undefining _LIBC
Khem Raj
raj.khem at gmail.com
Sat Mar 19 18:51:25 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=8ab7c0a7f9c13bd204f4abfe294d9ff02c2fac23
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future
While, cleanup a bit
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
libc/misc/ftw/ftw.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 9031e35..20ff4f0 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -23,6 +23,8 @@
#endif
#include <features.h>
+/* need errno.h before undefining _LIBC */
+#include <errno.h>
#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 <errno.h>
#include <ftw.h>
#include <limits.h>
#include <search.h>
@@ -77,11 +79,7 @@ char *alloca ();
#if HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
#endif
-#ifdef _LIBC
-# include <include/sys/stat.h>
-#else
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
#if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
char *stpcpy ();
--
1.7.3.4
More information about the uClibc-cvs
mailing list