aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-27 23:46:51 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-28 00:49:05 +0200
commit2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8 (patch)
tree43dbd812c9322f390f90d39d85f325bbc7d1cfd8 /io
parentMark __dso_handle as hidden [BZ #18822] (diff)
downloadglibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.tar.gz
glibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.tar.bz2
glibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.zip
hurd: Fix dirfd symbol exposition from ftw
dirfd is XOPEN2K8 only, it should not be exposed along ftw which is earlier. * include/dirent.h (__dirfd): New declaration. * dirent/dirfd.c (dirfd): Rename to __dirfd, and redefine as weak alias. * sysdeps/posix/dirfd/dirfd.c (dirfd): Likewise. * sysdeps/mach/hurd/dirfd.c (dirfd): Likewise. * io/ftw.c (open_dir_stream, ftw_dir): Use __dirfd instead of dirfd.
Diffstat (limited to 'io')
-rw-r--r--io/ftw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io/ftw.c b/io/ftw.c
index 63448e188a..6cca0e4cbc 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -361,7 +361,7 @@ open_dir_stream (int *dfdp, struct ftw_data *data, struct dir_data *dirp)
result = -1;
else
{
- dirp->streamfd = dirfd (dirp->stream);
+ dirp->streamfd = __dirfd (dirp->stream);
dirp->content = NULL;
data->dirstreams[data->actdir] = dirp;
@@ -518,7 +518,7 @@ fail:
/* If necessary, change to this directory. */
if (data->flags & FTW_CHDIR)
{
- if (__fchdir (dirfd (dir.stream)) < 0)
+ if (__fchdir (__dirfd (dir.stream)) < 0)
{
result = -1;
goto fail;
@@ -602,7 +602,7 @@ fail:
/* Change back to the parent directory. */
int done = 0;
if (old_dir->stream != NULL)
- if (__fchdir (dirfd (old_dir->stream)) == 0)
+ if (__fchdir (__dirfd (old_dir->stream)) == 0)
done = 1;
if (!done)