aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/readdir.c')
-rw-r--r--sysdeps/unix/readdir.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/unix/readdir.c b/sysdeps/unix/readdir.c
index 84ac033..00446a2 100644
--- a/sysdeps/unix/readdir.c
+++ b/sysdeps/unix/readdir.c
@@ -52,11 +52,12 @@ readdir (DIR *dirp)
off_t base;
ssize_t bytes;
- if (sizeof (dp->d_name) > 1)
- /* Fixed-size struct; must read one at a time (see below). */
- maxread = sizeof *dp;
- else
- maxread = dirp->allocation;
+#ifndef _DIRENT_HAVE_D_RECLEN
+ /* Fixed-size struct; must read one at a time (see below). */
+ maxread = sizeof *dp;
+#else
+ maxread = dirp->allocation;
+#endif
base = dirp->filepos;
bytes = __getdirentries (dirp->fd, dirp->data, maxread, &base);