[git commit 0_9_30] fnmatch.c: Include unistd.h before undefining _LIBC.
Khem Raj
raj.khem at gmail.com
Fri Nov 13 14:59:25 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=52c7e959d846a1bc214d4a2775f240dfd6a0b410
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
libc/misc/fnmatch/fnmatch.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index 8592d4c..2eb0003 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/libc/misc/fnmatch/fnmatch.c
@@ -21,6 +21,14 @@
# include <config.h>
#endif
+/* include unistd.h before we undefine _LIBC
+ * because smallint is defined in unistd.h based
+ * on _LIBC. For architectures that dont define
+ * smallint of there own and rely upon the definition
+ * from unistd.h will not build this file otherwise
+ */
+
+#include <unistd.h>
#include <features.h>
#ifdef __UCLIBC__
# undef _LIBC
@@ -41,7 +49,6 @@
#include <errno.h>
#include <fnmatch.h>
#include <ctype.h>
-#include <unistd.h>
#if HAVE_STRING_H || defined _LIBC
# include <string.h>
--
1.6.3.3
More information about the uClibc-cvs
mailing list