aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc/pwrite64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/pwrite64.c')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/pwrite64.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/pwrite64.c
index 9b990eb355..038e7a77da 100644
--- a/sysdeps/unix/sysv/linux/powerpc/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/pwrite64.c
@@ -22,6 +22,14 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
#ifdef __NR_pwrite
@@ -42,7 +50,7 @@ __libc_pwrite64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
- result = __syscall_pwrite (fd, buf, count, offset);
+ result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite64 (fd, buf, count, offset);