summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/closedir.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/dirent/closedir.c')
-rw-r--r--libc/misc/dirent/closedir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/misc/dirent/closedir.c b/libc/misc/dirent/closedir.c
index f2ead00f2..a2ac83b17 100644
--- a/libc/misc/dirent/closedir.c
+++ b/libc/misc/dirent/closedir.c
@@ -9,13 +9,13 @@ int closedir(DIR * dir)
int fd;
if (!dir) {
- errno = EBADF;
+ __set_errno(EBADF);
return -1;
}
/* We need to check dd_fd. */
if (dir->dd_fd == -1) {
- errno = EBADF;
+ __set_errno(EBADF);
return -1;
}
fd = dir->dd_fd;