[git commit] libc/sysdeps/linux/common/sendfile.c: fix sendfile64 visibility

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Jul 4 09:25:17 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=905775f198e8990dc8458d5879b934ebdc623ef4
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Commit a83ea57a50 introduces code for falling back on sendfile64
when the sendfile syscall is not available.  However, as written,
that code leads to sendfile64 being globally hidden in situations
where __NR_sendfile and __USE_LARGEFILE64 are defined.  In this case,
the flow executes strong_alias_untyped(sendfile,sendfile64) in
libc/sysdeps/linux/common/sendfile.c and libc_hidden_proto(sendfile64)
in include/sys/sendfile.h, but nowhere does it do libc_hidden_def(sendfile64).
This patch adds the needed libc_hidden_def(sendfile64).

This breaks, for example, xfsprogs on x86_64.  Reported by mardok4
in IRC.

Signed-off-by: Anthony G. Basile <blueness at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/common/sendfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c
index 2bd7179..2f48871 100644
--- a/libc/sysdeps/linux/common/sendfile.c
+++ b/libc/sysdeps/linux/common/sendfile.c
@@ -16,6 +16,7 @@
 _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
 	  size_t, count)
 # if defined __UCLIBC_HAS_LFS__ && (!defined __NR_sendfile64 || __WORDSIZE == 64)
+libc_hidden_def(sendfile64)
 strong_alias_untyped(sendfile,sendfile64)
 # endif
 


More information about the uClibc-cvs mailing list