summaryrefslogtreecommitdiff
path: root/libc/misc/glob/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/glob/glob.c')
-rw-r--r--libc/misc/glob/glob.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index 3fc20dbc2..d4a0b67ca 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -18,6 +18,7 @@ Cambridge, MA 02139, USA. */
#define strrchr __strrchr
#define strcoll __strcoll
#define qsort __qsort
+#define fnmatch __fnmatch
#include <features.h>
#include <stdlib.h>
@@ -32,6 +33,9 @@ Cambridge, MA 02139, USA. */
#define _GNU_SOURCE
#include <glob.h>
+extern DIR *__opendir (__const char *__name) __nonnull ((1)) attribute_hidden;
+extern int __closedir (DIR *__dirp) __nonnull ((1)) attribute_hidden;
+
extern __ptr_t (*__glob_opendir_hook) __P ((const char *directory));
extern void (*__glob_closedir_hook) __P ((__ptr_t stream));
extern const char *(*__glob_readdir_hook) __P ((__ptr_t stream));
@@ -397,7 +401,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
int meta;
stream = (__glob_opendir_hook ? (*__glob_opendir_hook) (directory)
- : (__ptr_t) opendir (directory));
+ : (__ptr_t) __opendir (directory));
if (stream == NULL)
{
if ((errfunc != NULL && (*errfunc) (directory, errno)) ||
@@ -497,7 +501,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
if (__glob_closedir_hook)
(*__glob_closedir_hook) (stream);
else
- (void) closedir ((DIR *) stream);
+ (void) __closedir ((DIR *) stream);
errno = save;
}
return nfound == 0 ? GLOB_NOMATCH : 0;
@@ -508,7 +512,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
if (__glob_closedir_hook)
(*__glob_closedir_hook) (stream);
else
- (void) closedir ((DIR *) stream);
+ (void) __closedir ((DIR *) stream);
errno = save;
}
while (names != NULL)