aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2007-09-15 09:24:42 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2009-08-25 03:53:16 -0400
commit2083887fe7bc4f19c4c46650935bbc1a9b6243f9 (patch)
tree55df2aee0964412b8eaa885f00da1c9bbfacb19e
parent40aa368d78ba157244034b8ebc220c3bcebf72c0 (diff)
downloaduClibc-2083887fe7bc4f19c4c46650935bbc1a9b6243f9.tar.gz
uClibc-2083887fe7bc4f19c4c46650935bbc1a9b6243f9.tar.bz2
also fix bug 1012 by moschny in 64bit version of readdir
-rw-r--r--libc/misc/dirent/readdir64_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/dirent/readdir64_r.c b/libc/misc/dirent/readdir64_r.c
index cc96effdf..d19ae4a56 100644
--- a/libc/misc/dirent/readdir64_r.c
+++ b/libc/misc/dirent/readdir64_r.c
@@ -39,7 +39,7 @@ int readdir64_r(DIR *dir, struct dirent64 *entry, struct dirent64 **result)
bytes = __getdents64(dir->dd_fd, dir->dd_buf, dir->dd_max);
if (bytes <= 0) {
*result = NULL;
- ret = errno;
+ ret = (bytes==0)? 0 : errno;
goto all_done;
}
dir->dd_size = bytes;