summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_putvall.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
commitfdffefb8032922ce7ffe4c00816072a8ff2148fc (patch)
treebc7313151a429c45d8bab8ad8b9dd32f4e51335f /src/libstddjb/buffer_putvall.c
parenta896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 (diff)
downloadskalibs-fdffefb8032922ce7ffe4c00816072a8ff2148fc.tar.xz
More types changes
New disize Add size_t to the autotypes list Delete redundant and replace-libc files dev_t/ino_t pass Big size_t pass More things missing, still not operational yet
Diffstat (limited to 'src/libstddjb/buffer_putvall.c')
-rw-r--r--src/libstddjb/buffer_putvall.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libstddjb/buffer_putvall.c b/src/libstddjb/buffer_putvall.c
index 22b7ae4..b04ac36 100644
--- a/src/libstddjb/buffer_putvall.c
+++ b/src/libstddjb/buffer_putvall.c
@@ -1,14 +1,16 @@
/* ISC license. */
+#include <sys/types.h>
+#include <sys/uio.h>
#include <errno.h>
-#include <skalibs/buffer.h>
#include <skalibs/siovec.h>
+#include <skalibs/buffer.h>
-int buffer_putvall (buffer *b, siovec_t const *v, unsigned int n, unsigned int *written)
+int buffer_putvall (buffer *b, struct iovec const *v, unsigned int n, size_t *written)
{
- unsigned int len = siovec_len(v, n) ;
- unsigned int w = n ;
- siovec_t vv[n] ;
+ size_t len = siovec_len(v, n) ;
+ size_t w = n ;
+ struct iovec vv[n ? n : 1] ;
if (*written > len) return (errno = EINVAL, 0) ;
while (w--) vv[w] = v[w] ;
w = *written ;