[git commit] correct sendfile for 32/64 bit archs
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 15 12:00:38 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=6507c3b84df2758ddcc44d6e761bb50a21120776
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/sysdeps/linux/common/sendfile.c | 5 +++--
libc/sysdeps/linux/common/sendfile64.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c
index 80f2e2e..64c200e 100644
--- a/libc/sysdeps/linux/common/sendfile.c
+++ b/libc/sysdeps/linux/common/sendfile.c
@@ -11,9 +11,10 @@
#ifdef __NR_sendfile
# include <sys/sendfile.h>
+# include <bits/wordsize.h>
_syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
size_t, count)
-# if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
-strong_alias(sendfile,sendfile64)
+# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_sendfile64 || __WORDSIZE == 64)
+strong_alias_untyped(sendfile,sendfile64)
# endif
#endif
diff --git a/libc/sysdeps/linux/common/sendfile64.c b/libc/sysdeps/linux/common/sendfile64.c
index 2442b80..705e6fd 100644
--- a/libc/sysdeps/linux/common/sendfile64.c
+++ b/libc/sysdeps/linux/common/sendfile64.c
@@ -12,8 +12,9 @@
#include <_lfs_64.h>
#include <sys/syscall.h>
+#include <bits/wordsize.h>
-#ifdef __NR_sendfile64
+#if defined __NR_sendfile64 && __WORDSIZE != 64
# include <sys/sendfile.h>
_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count)
#endif
More information about the uClibc-cvs
mailing list