diff options
-rw-r--r-- | arch/sh/syscall_arch.h | 1 | ||||
-rw-r--r-- | src/internal/syscall.h | 4 | ||||
-rw-r--r-- | src/unistd/pread.c | 2 | ||||
-rw-r--r-- | src/unistd/pwrite.c | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/arch/sh/syscall_arch.h b/arch/sh/syscall_arch.h index f63675a8..84758fe0 100644 --- a/arch/sh/syscall_arch.h +++ b/arch/sh/syscall_arch.h @@ -2,6 +2,7 @@ ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \ ((union { long long ll; long l[2]; }){ .ll = x }).l[1] #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x)) +#define __SYSCALL_LL_PRW(x) 0, __SYSCALL_LL_E((x)) /* The extra OR instructions are to work around a hardware bug: * http://documentation.renesas.com/doc/products/mpumcu/tu/tnsh7456ae.pdf diff --git a/src/internal/syscall.h b/src/internal/syscall.h index ff3cf53a..6d378a81 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -12,6 +12,10 @@ #define SYSCALL_MMAP2_UNIT 4096ULL #endif +#ifndef __SYSCALL_LL_PRW +#define __SYSCALL_LL_PRW(x) __SYSCALL_LL_O(x) +#endif + #ifndef __scc #define __scc(X) ((long) (X)) typedef long syscall_arg_t; diff --git a/src/unistd/pread.c b/src/unistd/pread.c index 3d2799fd..5483eb9d 100644 --- a/src/unistd/pread.c +++ b/src/unistd/pread.c @@ -4,7 +4,7 @@ ssize_t pread(int fd, void *buf, size_t size, off_t ofs) { - return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_O(ofs)); + return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs)); } LFS64(pread); diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c index bbe4c345..4bf3d7df 100644 --- a/src/unistd/pwrite.c +++ b/src/unistd/pwrite.c @@ -4,7 +4,7 @@ ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs) { - return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_O(ofs)); + return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs)); } LFS64(pwrite); |