diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-09-27 23:46:51 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-09-28 00:49:05 +0200 |
commit | 2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8 (patch) | |
tree | 43dbd812c9322f390f90d39d85f325bbc7d1cfd8 /sysdeps | |
parent | 825adeeed1e95990fd1efb70d9ac3eb7f1ea802a (diff) | |
download | glibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.zip glibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.tar.gz glibc-2c7bbfaf4e361b482f3ccfbdbb29cc5121ca0ea8.tar.bz2 |
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 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/dirfd.c | 4 | ||||
-rw-r--r-- | sysdeps/posix/dirfd.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c index 0ad290d..6567333 100644 --- a/sysdeps/mach/hurd/dirfd.c +++ b/sysdeps/mach/hurd/dirfd.c @@ -22,7 +22,7 @@ #include <errno.h> int -dirfd (DIR *dirp) +__dirfd (DIR *dirp) { int fd; @@ -41,3 +41,5 @@ dirfd (DIR *dirp) return fd; } + +weak_alias (__dirfd, dirfd) diff --git a/sysdeps/posix/dirfd.c b/sysdeps/posix/dirfd.c index fee8326..ce779c5 100644 --- a/sysdeps/posix/dirfd.c +++ b/sysdeps/posix/dirfd.c @@ -22,7 +22,9 @@ #undef dirfd int -dirfd (DIR *dirp) +__dirfd (DIR *dirp) { return dirp->fd; } + +weak_alias (__dirfd, dirfd) |