From 5e0dbbcf0e6206d3e1dec0c11e01b8f2598b49a3 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Fri, 26 Jan 2018 22:35:29 +0000 Subject: [PATCH] git-seekdir-linknamespace commit 6c16da9834e158e26edca046ddd597f850d9e244 Author: Samuel Thibault Date: Thu Sep 28 00:41:02 2017 +0200 hurd: Fix `seekdir' symbol exposition from `rewinddir' `seekdir' is MISC || XOPEN, it should not be exposed along `rewinddir' which is POSIX. * include/dirent.h (__seekdir): New declaration. * sysdeps/mach/hurd/seekdir.c (seekdir): Rename to __seekdir and redefine as weak alias. * sysdeps/mach/hurd/rewinddir.c (__rewinddir): Use __seekdir instead of seekdir. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-seekdir-linknamespace.diff --- include/dirent.h | 1 + sysdeps/mach/hurd/rewinddir.c | 2 +- sysdeps/mach/hurd/seekdir.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/dirent.h b/include/dirent.h index 9e72ae3ca..d7c97f931 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -48,6 +48,7 @@ extern DIR *__alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp) internal_function attribute_hidden; extern __typeof (rewinddir) __rewinddir; +extern __typeof (seekdir) __seekdir; extern __typeof (dirfd) __dirfd; extern void __scandir_cancel_handler (void *arg) attribute_hidden; diff --git a/sysdeps/mach/hurd/rewinddir.c b/sysdeps/mach/hurd/rewinddir.c index b6791d95c..84aa87c96 100644 --- a/sysdeps/mach/hurd/rewinddir.c +++ b/sysdeps/mach/hurd/rewinddir.c @@ -24,7 +24,7 @@ void __rewinddir (DIR *dirp) { - seekdir (dirp, (off_t) 0L); + __seekdir (dirp, (off_t) 0L); } libc_hidden_def (__rewinddir) weak_alias (__rewinddir, rewinddir) diff --git a/sysdeps/mach/hurd/seekdir.c b/sysdeps/mach/hurd/seekdir.c index 8d3020b02..68f7ce07c 100644 --- a/sysdeps/mach/hurd/seekdir.c +++ b/sysdeps/mach/hurd/seekdir.c @@ -22,9 +22,8 @@ #include "dirstream.h" /* Seek to position POS in DIRP. */ -/* XXX should be __seekdir ? */ void -seekdir (DIR *dirp, long int pos) +__seekdir (DIR *dirp, long int pos) { __libc_lock_lock (dirp->__lock); /* Change our entry index pointer to POS and discard any data already @@ -35,3 +34,5 @@ seekdir (DIR *dirp, long int pos) dirp->__size = 0; __libc_lock_unlock (dirp->__lock); } + +weak_alias (__seekdir, seekdir) -- 2.30.2