summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/scandir.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/scandir.c')
-rw-r--r--lib/libc/gen/scandir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c
index 1c1fee1..e6e8408 100644
--- a/lib/libc/gen/scandir.c
+++ b/lib/libc/gen/scandir.c
@@ -79,7 +79,7 @@ scandir(dirname, namelist, select, dcomp)
/*
* estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
+ * and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
@@ -96,7 +96,8 @@ scandir(dirname, namelist, select, dcomp)
p = (struct dirent *)malloc(DIRSIZ(d));
if (p == NULL)
return(-1);
- p->d_ino = d->d_ino;
+ p->d_fileno = d->d_fileno;
+ p->d_type = d->d_type;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
bcopy(d->d_name, p->d_name, p->d_namlen + 1);
OpenPOWER on IntegriCloud