]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/preadv64v2.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / posix / preadv64v2.c
index a4844b145c9629405765ce069968f7c3a7b954d8..b86410c6b27e63cf0d20ad42a14400b85f3768d2 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic version of preadv2.
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2019 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
@@ -30,7 +30,10 @@ preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
       return -1;
     }
 
-  return preadv64 (fd, vector, count, offset);
+  if (offset == -1)
+    return __readv (fd, vector, count);
+  else
+    return preadv64 (fd, vector, count, offset);
 }
 
 #ifdef __OFF_T_MATCHES_OFF64_T