aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-09 22:06:07 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-09 22:06:07 +0000
commit24030b0f789a2b6e2429c6158cf57d59518bcf36 (patch)
treeb63ceb00aa7dbff8a3e18ca7e8885b5ac3c3bdf0 /sysdeps/unix/sysv/linux/pwritev.c
parent* sysdeps/unix/sysv/linux/preadv.c: Avoid prototype for static (diff)
downloadglibc-24030b0f789a2b6e2429c6158cf57d59518bcf36.tar.gz
glibc-24030b0f789a2b6e2429c6158cf57d59518bcf36.tar.bz2
glibc-24030b0f789a2b6e2429c6158cf57d59518bcf36.zip
function if it is not defined. Add some necessary casts.
Diffstat (limited to 'sysdeps/unix/sysv/linux/pwritev.c')
-rw-r--r--sysdeps/unix/sysv/linux/pwritev.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c
index 2031adda10..1916abe485 100644
--- a/sysdeps/unix/sysv/linux/pwritev.c
+++ b/sysdeps/unix/sysv/linux/pwritev.c
@@ -29,6 +29,13 @@
#include <sys/syscall.h>
#include <kernel-features.h>
+#ifdef __x86_64__
+#define __NR_pwritev 296
+#elif defined __i386__
+#define __NR_pwritev 334
+#endif
+
+
#ifndef PWRITEV
# define PWRITEV pwritev
# define PWRITEV_REPLACEMENT __atomic_pwritev_replacement
@@ -53,14 +60,16 @@ PWRITEV (fd, vector, count, offset)
ssize_t result;
if (SINGLE_THREAD_P)
- result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
- offset & 0xffffffff);
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
else
{
int oldtype = LIBC_CANCEL_ASYNC ();
- result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
- offset & 0xffffffff);
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
LIBC_CANCEL_RESET (oldtype);
}