Set errno to 0 before calling readdir in Syscall.readdir().
[mono.git] / support / dirent.c
index 939d915d949553729d64b6e89577b9152cc3aa54..bc1b3e238e16730ad5113258b05eb174ec214b6f 100644 (file)
@@ -78,6 +78,7 @@ Mono_Posix_Syscall_readdir (void *dirp, struct Mono_Posix_Syscall__Dirent *entry
                return -1;
        }
 
+       errno = 0;
        d = readdir (dirp);
 
        if (d == NULL) {