From 0784fb9ef24222abde90c95e5c1598e5c08db386 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 1 Aug 2009 00:57:05 -0700 Subject: fnmatch.c: Include unistd.h before undefining _LIBC. Signed-off-by: Khem Raj --- libc/misc/fnmatch/fnmatch.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libc') diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c index 00fd4d465..cf3086715 100644 --- a/libc/misc/fnmatch/fnmatch.c +++ b/libc/misc/fnmatch/fnmatch.c @@ -21,6 +21,14 @@ # include #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 #include #ifdef __UCLIBC__ # undef _LIBC @@ -41,7 +49,6 @@ #include #include #include -#include #if HAVE_STRING_H || defined _LIBC # include @@ -212,7 +219,7 @@ extern int errno; # endif /* Global variable. */ -smallint posixly_correct; +static smallint posixly_correct; /* This function doesn't exist on most systems. */ -- cgit v1.2.3