diff options
Diffstat (limited to 'sysdeps/posix/writev.c')
-rw-r--r-- | sysdeps/posix/writev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/posix/writev.c b/sysdeps/posix/writev.c index ae5ef1efb4..a347cc2eac 100644 --- a/sysdeps/posix/writev.c +++ b/sysdeps/posix/writev.c @@ -23,6 +23,7 @@ #include <stdbool.h> #include <sys/param.h> #include <sys/uio.h> +#include <errno.h> /* Write data pointed by the buffers described by VECTOR, which is a vector of COUNT `struct iovec's, to file descriptor FD. @@ -46,7 +47,7 @@ __libc_writev (int fd, const struct iovec *vector, int count) /* Check for ssize_t overflow. */ if (SSIZE_MAX - bytes < vector[i].iov_len) { - errno = EINVAL; + __set_errno (EINVAL); return -1; } bytes += vector[i].iov_len; |