From: GNU Libc Maintainers Date: Sun, 14 Jan 2018 10:24:48 +0000 (+0000) Subject: git-seekdir-linknamespace X-Git-Tag: archive/raspbian/2.26-4+rpi1^2~62 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b3319a32be9c3cfef21c293179bda35f2e70e1c2;p=glibc.git 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 --- 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)