Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Kieß <s-kiess@web.de>2013-03-26 22:53:00 +0400
committerSteffen Kieß <s-kiess@web.de>2013-03-26 22:53:00 +0400
commit6ceccd8cd264e92a956a4375e13170cbcc7191e9 (patch)
treefa17aa5278438158138217da3c26ab3cb8de2879
parent76da0ed16c2c86874e8c7503c881855878319fee (diff)
Set errno to 0 before calling readdir in Syscall.readdir().
This will allow the caller to distinguish between errors and end-of-directory.
-rw-r--r--support/dirent.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/support/dirent.c b/support/dirent.c
index 939d915d949..bc1b3e238e1 100644
--- a/support/dirent.c
+++ b/support/dirent.c
@@ -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) {