summaryrefslogtreecommitdiff
path: root/sysdeps/unix/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/readdir.c')
-rw-r--r--sysdeps/unix/readdir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/readdir.c b/sysdeps/unix/readdir.c
index 1842948a35..b1d7e43231 100644
--- a/sysdeps/unix/readdir.c
+++ b/sysdeps/unix/readdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -77,6 +77,8 @@ DEFUN(readdir, (dirp), DIR *dirp)
p = memchr ((PTR) dp->d_name, '\0', D_NAMLEN (dp) + 1);
d->d_namlen = (p != NULL) ? p - dp->d_name : D_NAMLEN (dp);
memcpy (d->d_name, dp->d_name, d->d_namlen + 1);
+ d->d_type = DT_UNKNOWN;
+ d->d_reclen = &d->d_name[d->d_namlen + 1] - (char *) d;
return d;
}
}