OSDN Git Service

llseek: support __NR_llseek syscall
authorMark Salter <msalter@redhat.com>
Thu, 26 Apr 2012 14:14:49 +0000 (10:14 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 27 Apr 2012 03:11:02 +0000 (23:11 -0400)
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@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libc/sysdeps/linux/common/llseek.c

index cd150ad..ff16917 100644 (file)
 #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)