[PATCH] pwrite/pread: syscalls are named as __NR_pwrite64/pread64 in recent kernels
Enrico Scholz <[email protected]> Sun, 20 Feb 2011 16:16:40 +0100
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <1298215004-28546-4-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> |
Signed-off-by: Enrico Scholz <[email protected]> --- syscalls.s/__pread.S | 4 ++++ syscalls.s/__pwrite.S | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/syscalls.s/__pread.S b/syscalls.s/__pread.S index 9cf11ce..dfcbbd3 100644 --- a/syscalls.s/__pread.S +++ b/syscalls.s/__pread.S @@ -1,3 +1,7 @@ #include "syscalls.h" +#ifdef __NR_pread64 +syscall_weak(pread64,pread64,__libc_pread64) +#elif defined(__NR_pread) syscall_weak(pread,pread64,__libc_pread64) +#endif diff --git a/syscalls.s/__pwrite.S b/syscalls.s/__pwrite.S index fc826d6..0bb704d 100644 --- a/syscalls.s/__pwrite.S +++ b/syscalls.s/__pwrite.S @@ -1,3 +1,7 @@ #include "syscalls.h" +#ifdef __NR_pwrite64 +syscall_weak(pwrite64,pwrite64,__libc_pwrite64) +#elif defined(__NR_pwrite) syscall_weak(pwrite,pwrite64,__libc_pwrite64) +#endif -- 1.7.4