about summary refs log tree commit diff
path: root/sysdeps/posix/pwritev64v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/pwritev64v2.c')
-rw-r--r--sysdeps/posix/pwritev64v2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/posix/pwritev64v2.c b/sysdeps/posix/pwritev64v2.c
index be98aeed9d..ae4c4284c2 100644
--- a/sysdeps/posix/pwritev64v2.c
+++ b/sysdeps/posix/pwritev64v2.c
@@ -30,7 +30,10 @@ pwritev64v2 (int fd, const struct iovec *vector, int count, OFF_T offset,
       return -1;
     }
 
-  return pwritev64 (fd, vector, count, offset);
+  if (offset == -1)
+    return __writev (fd, vector, count);
+  else
+    return pwritev64 (fd, vector, count, offset);
 }
 
 #ifdef __OFF_T_MATCHES_OFF64_T