about summary refs log tree commit diff
path: root/sysdeps/unix/readdir_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/readdir_r.c')
-rw-r--r--sysdeps/unix/readdir_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/unix/readdir_r.c
index fa26db6381..a4462f73e7 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/unix/readdir_r.c
@@ -103,6 +103,6 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
 
   __libc_lock_unlock (dirp->lock);
 
-  return dp != NULL ? 0 : -1;
+  return dp != NULL ? 0 : errno;
 }
 weak_alias (__readdir_r, readdir_r)