projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76da0ed
)
Set errno to 0 before calling readdir in Syscall.readdir().
author
Steffen Kieß
<s-kiess@web.de>
Tue, 26 Mar 2013 18:53:00 +0000
(19:53 +0100)
committer
Steffen Kieß
<s-kiess@web.de>
Tue, 26 Mar 2013 18:53:00 +0000
(19:53 +0100)
This will allow the caller to distinguish between errors and end-of-directory.
support/dirent.c
patch
|
blob
|
history
diff --git
a/support/dirent.c
b/support/dirent.c
index 939d915d949553729d64b6e89577b9152cc3aa54..bc1b3e238e16730ad5113258b05eb174ec214b6f 100644
(file)
--- 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) {