diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-06-09 19:52:01 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-06-09 19:52:01 +0000 |
commit | d3ab671c942ba15a5b20f383ce71e387f17ae2c4 (patch) | |
tree | cb8b32f20c68d0b1487d2e300507f16f5dd52df2 /sysdeps/unix/sysv/linux/fstatvfs.c | |
parent | dd26c44403582fdf10d663170f947dfe4b3207a0 (diff) | |
download | glibc-d3ab671c942ba15a5b20f383ce71e387f17ae2c4.tar.gz |
Fix pathconf statvfs namespace (bug 18507).
pathconf uses __statvfs64, and fpathconf uses __fstatvfs64. On
systems using sysdeps/unix/sysv/linux/wordsize-64, __statvfs64 then
brings in the strong symbol statvfs, and __fstatvfs64 brings in the
strong symbol fstatvfs, which are not in all the standards that have
pathconf and fpathconf. This patch fixes this by making those symbols
into weak aliases.
Tested for x86_64 and x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).
[BZ #18507]
* sysdeps/unix/sysv/linux/fstatvfs.c (fstatvfs): Rename to
__fstatvfs and define as weak alias of __fstatvfs. Use
libc_hidden_weak.
* sysdeps/unix/sysv/linux/statvfs.c (statvs): Rename to __statvfs
and define as weak alias of __statvfs. Use libc_hidden_weak.
* sysdeps/unix/sysv/linux/wordsize-64/fstatvfs.c (__fstatvfs64):
Define as alias of __fstatvfs, not fstatvfs.
(fstatvfs64): Likewise.
* sysdeps/unix/sysv/linux/wordsize-64/statvfs.c (__statvfs64):
Define as alias of __statvfs, not statvfs.
(statvfs64): Likewise.
* conform/Makefile (test-xfail-POSIX/unistd.h/linknamespace):
Remove variable.
Diffstat (limited to 'sysdeps/unix/sysv/linux/fstatvfs.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/fstatvfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatvfs.c b/sysdeps/unix/sysv/linux/fstatvfs.c index 46385269cf..1b613302b8 100644 --- a/sysdeps/unix/sysv/linux/fstatvfs.c +++ b/sysdeps/unix/sysv/linux/fstatvfs.c @@ -26,7 +26,7 @@ extern void __internal_statvfs (const char *name, struct statvfs *buf, int -fstatvfs (int fd, struct statvfs *buf) +__fstatvfs (int fd, struct statvfs *buf) { struct statfs fsbuf; @@ -40,4 +40,5 @@ fstatvfs (int fd, struct statvfs *buf) /* We signal success if the statfs call succeeded. */ return 0; } -libc_hidden_def (fstatvfs) +weak_alias (__fstatvfs, fstatvfs) +libc_hidden_weak (fstatvfs) |