-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 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
#include <ansidecl.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
#include <sys/uio.h>
/* Write data pointed by the buffers described by VECTOR, which
/* Find the total number of bytes to be written. */
bytes = 0;
for (i = 0; i < count; ++i)
- bytes += vector[i].io_len;
+ bytes += vector[i].iov_len;
/* Allocate a temporary buffer to hold the data. */
buffer = (char *) __alloca(bytes);
for (i = 0; i < count; ++i)
{
#define min(a, b) ((a) > (b) ? (b) : (a))
- size_t copy = min(vector[i].io_len, to_copy);
+ size_t copy = min(vector[i].iov_len, to_copy);
- (void) memcpy((PTR) bp, (PTR) vector[i].io_buf, copy);
+ (void) memcpy((PTR) bp, (PTR) vector[i].iov_base, copy);
bp += copy;
to_copy -= copy;