From 7bad8cf68b6e2434686bd80182f4a5bc22004416 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Thu, 26 Apr 2012 10:14:49 -0400 Subject: llseek: support __NR_llseek syscall 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 Signed-off-by: Mike Frysinger --- libc/sysdeps/linux/common/llseek.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c index cd150ad9f..ff16917e2 100644 --- a/libc/sysdeps/linux/common/llseek.c +++ b/libc/sysdeps/linux/common/llseek.c @@ -11,6 +11,11 @@ #include #include +/* 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) -- cgit v1.2.3