diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-04-29 09:33:07 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-04-29 09:35:30 +0200 |
commit | 137fe72eca6923a00381a3ca9f0e7672c1f85e3f (patch) | |
tree | fc4a07ab79ee0f89a6b9d4141d9f4639c87f2f33 /posix/bug-glob2.c | |
parent | Fix stdio.h namespace for pre-threads POSIX (bug 20014). (diff) | |
download | glibc-137fe72eca6923a00381a3ca9f0e7672c1f85e3f.tar.gz glibc-137fe72eca6923a00381a3ca9f0e7672c1f85e3f.tar.bz2 glibc-137fe72eca6923a00381a3ca9f0e7672c1f85e3f.zip |
glob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir
Previously, application code had to set up the d_namlen member if
the target supported it, involving conditional compilation. After
this change, glob will use the length of the string in d_name instead
of d_namlen to determine the file name length. All glibc targets
provide the d_type and d_ino members, and setting them as needed for
gl_readdir is straightforward.
Changing the behavior with regards to d_ino is left to a future
cleanup.
Diffstat (limited to 'posix/bug-glob2.c')
-rw-r--r-- | posix/bug-glob2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/bug-glob2.c b/posix/bug-glob2.c index ddf5ec913b..0fdc5d0a53 100644 --- a/posix/bug-glob2.c +++ b/posix/bug-glob2.c @@ -193,7 +193,7 @@ my_readdir (void *gdir) return NULL; } - dir->d.d_ino = dir->idx; + dir->d.d_ino = 1; /* glob should not skip this entry. */ #ifdef _DIRENT_HAVE_D_TYPE dir->d.d_type = filesystem[dir->idx].type; |