From 6793e73e905d85566c87a667f360c6fa3bd2bee0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 26 Feb 2002 02:51:03 +0000 Subject: Enable pread/pwrite --- libpthread/linuxthreads/wrapsyscall.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libpthread') diff --git a/libpthread/linuxthreads/wrapsyscall.c b/libpthread/linuxthreads/wrapsyscall.c index 1e1cab909..4075c00bf 100644 --- a/libpthread/linuxthreads/wrapsyscall.c +++ b/libpthread/linuxthreads/wrapsyscall.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifndef PIC @@ -126,7 +127,6 @@ strong_alias (open64, __open64) CANCELABLE_SYSCALL (int, pause, (void), ()) -#if 0 /* Enable this if enabling these in syscalls.c */ /* pread(3). */ CANCELABLE_SYSCALL (ssize_t, pread, (int fd, void *buf, size_t count, @@ -134,7 +134,7 @@ CANCELABLE_SYSCALL (ssize_t, pread, (int fd, void *buf, size_t count, (fd, buf, count, offset)) -#ifdef __UCLIBC_HAVE_LFS__ +#if defined __UCLIBC_HAVE_LFS__ && defined __NR_pread64 /* pread64(3). */ CANCELABLE_SYSCALL (ssize_t, pread64, (int fd, void *buf, size_t count, off64_t offset), @@ -148,14 +148,13 @@ CANCELABLE_SYSCALL (ssize_t, pwrite, (int fd, const void *buf, size_t n, (fd, buf, n, offset)) -#ifdef __UCLIBC_HAVE_LFS__ +#if defined __UCLIBC_HAVE_LFS__ && defined __NR_pwrited64 /* pwrite64(3). */ CANCELABLE_SYSCALL (ssize_t, pwrite64, (int fd, const void *buf, size_t n, off64_t offset), (fd, buf, n, offset)) strong_alias (pwrite64, __pwrite64) #endif -#endif /* read(2). */ CANCELABLE_SYSCALL (ssize_t, read, (int fd, void *buf, size_t count), -- cgit v1.2.3