[git commit branch/0.9.33] llseek: support __NR_llseek syscall
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Tue May 15 07:13:25 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=db27d2f961cfd0838144bdcbc9b30b6ad22950c3
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33
Older kernels use __NR__llseek for a 64-bit lseek syscall. Newer
kernels use __NR_llseek. This patch fixes the implementation of
lseek64 to use the __NR_llseek syscall if it exists.
Signed-off-by: Mark Salter <msalter at redhat.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/sysdeps/linux/common/llseek.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index cd150ad..ff16917 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -11,6 +11,11 @@
#include <sys/types.h>
#include <sys/syscall.h>
+/* Newer kernel ports have llseek() instead of _llseek() */
+#if !defined __NR__llseek && defined __NR_llseek
+# define __NR__llseek __NR_llseek
+#endif
+
#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
loff_t lseek64(int fd, loff_t offset, int whence)
More information about the uClibc-cvs
mailing list