summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/pwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/pwrite.c')
-rw-r--r--sysdeps/mach/hurd/pwrite.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sysdeps/mach/hurd/pwrite.c b/sysdeps/mach/hurd/pwrite.c
index 83288acce5..42236e4c3c 100644
--- a/sysdeps/mach/hurd/pwrite.c
+++ b/sysdeps/mach/hurd/pwrite.c
@@ -1,6 +1,6 @@
/* Write block at given position in file without changing file pointer.
Hurd version.
- Copyright (C) 1999,2001 Free Software Foundation, Inc.
+ Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,19 +20,13 @@
#include <errno.h>
#include <unistd.h>
-#include <hurd/fd.h>
/* Write NBYTES of BUF to FD at given position OFFSET without changing
the file position. Return the number written, or -1. */
ssize_t
__libc_pwrite (int fd, const void *buf, size_t nbytes, off_t offset)
{
- error_t err;
- if (offset < 0)
- err = EINVAL;
- else
- err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, buf, &nbytes, offset));
- return err ? __hurd_dfail (fd, err) : nbytes;
+ return __libc_pwrite64 (fd, buf, nbytes, (off64_t) offset);
}
#ifndef __libc_pwrite