summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/opendir.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-01 20:43:44 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-01 20:43:44 +0000
commit8a0b43005ad9ea011b80d66e32b46fb430ddaffb (patch)
tree418818740042c5dbba244bc1efc760c8d29e47a9 /libc/misc/dirent/opendir.c
parent42b161bb716f35948fabd36472fb59cd0a20fa92 (diff)
Hide mostly used functions
Diffstat (limited to 'libc/misc/dirent/opendir.c')
-rw-r--r--libc/misc/dirent/opendir.c6
1 files changed, 3 insertions, 3 deletions
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" <besp@midway.uchicago.edu>.
@@ -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;