From 1d08dcf46dd4b2cfe3e27723c05b0aec9955c591 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Tue, 10 Jul 2001 13:48:44 +0000 Subject: Merge iov fixes from Richard Kettlewell --- io.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index d38d1fe..823f9c3 100644 --- a/io.c +++ b/io.c @@ -33,7 +33,9 @@ #include "defs.h" #include +#if HAVE_SYS_UIO_H #include +#endif #ifdef HAVE_LONG_LONG_OFF_T /* @@ -72,11 +74,12 @@ struct tcb *tcp; return 0; } +#if HAVE_SYS_UIO_H void tprint_iov(tcp, len, addr) struct tcb * tcp; int len; -char * addr; +long addr; { struct iovec *iov; int i; @@ -91,7 +94,7 @@ char * addr; fprintf(stderr, "No memory"); return; } - if (umoven(tcp, (int) addr, + if (umoven(tcp, addr, len * sizeof *iov, (char *) iov) < 0) { tprintf("%#lx", tcp->u_arg[1]); } else { @@ -138,6 +141,7 @@ struct tcb *tcp; } return 0; } +#endif #if defined(SVR4) -- cgit v1.2.3