diff options
author | Steffen Kieß <s-kiess@web.de> | 2013-03-26 22:53:00 +0400 |
---|---|---|
committer | Steffen Kieß <s-kiess@web.de> | 2013-03-26 22:53:00 +0400 |
commit | 6ceccd8cd264e92a956a4375e13170cbcc7191e9 (patch) | |
tree | fa17aa5278438158138217da3c26ab3cb8de2879 | |
parent | 76da0ed16c2c86874e8c7503c881855878319fee (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.c | 1 |
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) { |