summaryrefslogtreecommitdiff
path: root/lib/e2p
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2p')
-rw-r--r--lib/e2p/iod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/e2p/iod.c b/lib/e2p/iod.c
index 2c675b9d..1edfc4f2 100644
--- a/lib/e2p/iod.c
+++ b/lib/e2p/iod.c
@@ -56,12 +56,12 @@ int iterate_on_dir (const char * dir_name,
return -1;
}
while ((dep = readdir (dir))) {
- len = sizeof(struct dirent);
#ifdef HAVE_RECLEN_DIRENT
- if (len < dep->d_reclen)
- len = dep->d_reclen;
+ len = dep->d_reclen;
if (len > max_len)
len = max_len;
+#else
+ len = sizeof(struct dirent);
#endif
memcpy(de, dep, len);
if ((*func)(dir_name, de, private))