git-seekdir-linknamespace
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
commit 6c16da9834e158e26edca046ddd597f850d9e244
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
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
sysdeps/mach/hurd/rewinddir.c
sysdeps/mach/hurd/seekdir.c

index 9e72ae3ca6bfc4766dd18a32f732d75db43b75bb..d7c97f9317ebffff2d305720aa953c5d8d330acd 100644 (file)
@@ -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;
index b6791d95c3fe79e9beffefc8d7dd14bdbb4f8eba..84aa87c9617379344382ab0f6558f71a2058eb35 100644 (file)
@@ -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)
index 8d3020b02c7e7908605b60f938bac1fd513d4de0..68f7ce07c56a0d5ab3821b88f56051e7abb1af55 100644 (file)
@@ -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)