diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-02-19 17:18:51 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-02-19 17:18:51 +0000 |
commit | 40176158f1bfcf4fd1621169221c1aa8f0c3c300 (patch) | |
tree | 52a8351f99e40724de12016b07625877253b6c47 /include | |
parent | 4629c866ad79167d60ca9bf263d871eabb59d3d9 (diff) | |
download | glibc-40176158f1bfcf4fd1621169221c1aa8f0c3c300.zip glibc-40176158f1bfcf4fd1621169221c1aa8f0c3c300.tar.gz glibc-40176158f1bfcf4fd1621169221c1aa8f0c3c300.tar.bz2 |
Fix scandir scandirat namespace (bug 17999).
The POSIX function scandir calls scandirat, which is not a POSIX
function. This patch fixes this by making it use __scandirat and
making scandirat a weak alias. There are no changes for scandir64 /
scandirat64 because those are both _GNU_SOURCE-only functions so no
namespace issue arises for them.
Tested for x86_64 that the disassembly of installed shared libraries
is unchanged by this patch.
[BZ #17999]
* dirent/scandir.c [!SCANDIR] (SCANDIRAT): Define to __scandirat
instead of scandirat.
* dirent/scandirat.c [!SCANDIRAT] (SCANDIRAT): Likewise.
[!SCANDIRAT] (SCANDIRAT_WEAK_ALIAS): Define.
[SCANDIRAT_WEAK_ALIAS] (scandirat): Define as weak alias of
__scandirat.
* include/dirent.h (scandirat): Do not use libc_hidden_proto.
(__scandirat): Declare. Use libc_hidden_proto.
* conform/Makefile (test-xfail-POSIX2008/dirent.h/linknamespace):
Remove variable.
(test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise.
Diffstat (limited to 'include')
-rw-r--r-- | include/dirent.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h index e8e9e42..2e797ae 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -50,7 +50,8 @@ extern void __scandir_cancel_handler (void *arg); extern __typeof (rewinddir) __rewinddir; libc_hidden_proto (__rewinddir) -libc_hidden_proto (scandirat) +extern __typeof (scandirat) __scandirat; +libc_hidden_proto (__scandirat) libc_hidden_proto (scandirat64) # endif |