aboutsummaryrefslogtreecommitdiff
path: root/dirent/scandir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dirent/scandir.c')
-rw-r--r--dirent/scandir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dirent/scandir.c b/dirent/scandir.c
index b1fc55fbb2..ac625d89f3 100644
--- a/dirent/scandir.c
+++ b/dirent/scandir.c
@@ -31,7 +31,7 @@ scandir (dir, namelist, select, cmp)
DIR *dp = opendir (dir);
struct dirent **v = NULL;
size_t vsize = 0, i;
- struct dirent dirbuf, *d;
+ struct dirent *d;
int save;
if (dp == NULL)
@@ -41,7 +41,7 @@ scandir (dir, namelist, select, cmp)
__set_errno (0);
i = 0;
- while (__readdir_r (dp, &dirbuf, &d) >= 0)
+ while ((d = __readdir (dp)) != NULL)
if (select == NULL || (*select) (d))
{
size_t dsize;