diff options
Diffstat (limited to 'src/libstddjb/siovec_len.c')
-rw-r--r-- | src/libstddjb/siovec_len.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstddjb/siovec_len.c b/src/libstddjb/siovec_len.c index 5d53e53..5465fd7 100644 --- a/src/libstddjb/siovec_len.c +++ b/src/libstddjb/siovec_len.c @@ -1,10 +1,12 @@ /* ISC license. */ +#include <sys/types.h> +#include <sys/uio.h> #include <skalibs/siovec.h> -unsigned int siovec_len (siovec_t const *v, register unsigned int n) +size_t siovec_len (struct iovec const *v, unsigned int n) { - register unsigned int w = 0 ; - while (n--) w += v[n].len ; + size_t w = 0 ; + while (n--) w += v[n].iov_len ; return w ; } |