From 8a0b43005ad9ea011b80d66e32b46fb430ddaffb Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 1 Dec 2005 20:43:44 +0000 Subject: Hide mostly used functions --- libc/misc/dirent/opendir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/misc/dirent/opendir.c') diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c index 017684b40..9f5f75e3f 100644 --- a/libc/misc/dirent/opendir.c +++ b/libc/misc/dirent/opendir.c @@ -24,7 +24,7 @@ DIR *opendir(const char *name) __set_errno(ENOTDIR); return NULL; } - if ((fd = open(name, O_RDONLY)) < 0) + if ((fd = __open(name, O_RDONLY)) < 0) return NULL; /* According to POSIX, directory streams should be closed when * exec. From "Anna Pluzhnikov" . @@ -32,7 +32,7 @@ DIR *opendir(const char *name) if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) return NULL; if (!(ptr = malloc(sizeof(*ptr)))) { - close(fd); + __close(fd); __set_errno(ENOMEM); return NULL; } @@ -45,7 +45,7 @@ DIR *opendir(const char *name) ptr->dd_max = 512; if (!(buf = calloc(1, ptr->dd_max))) { - close(fd); + __close(fd); free(ptr); __set_errno(ENOMEM); return NULL; -- cgit v1.2.3