summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/misc/dirent/readdir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/misc/dirent/readdir.c b/libc/misc/dirent/readdir.c
index 81575283d..1568199eb 100644
--- a/libc/misc/dirent/readdir.c
+++ b/libc/misc/dirent/readdir.c
@@ -55,5 +55,7 @@ struct dirent *readdir(DIR * dir)
/* We have to save the next offset here. */
dir->dd_nextoff = de->d_off;
+ __set_errno(0);
+
return de;
}