From 64a4af28a62e9f305c82bc9649bbe065fffdeb0d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 28 Sep 2017 00:41:02 +0200 Subject: 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. --- sysdeps/mach/hurd/rewinddir.c | 2 +- sysdeps/mach/hurd/seekdir.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/mach/hurd/rewinddir.c b/sysdeps/mach/hurd/rewinddir.c index b6791d9..84aa87c 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 8d3020b..68f7ce0 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) -- cgit v1.1