summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorJohn Hughes <john@Calva.COM>2001-07-10 13:48:44 +0000
committerJohn Hughes <john@Calva.COM>2001-07-10 13:48:44 +0000
commit1d08dcf46dd4b2cfe3e27723c05b0aec9955c591 (patch)
treeb0be6e9d6120b4350b67bad820a72eb1c9c36b49 /io.c
parent688c7fc3e70b67121d56d423f1c5d79829239a6e (diff)
downloadstrace-1d08dcf46dd4b2cfe3e27723c05b0aec9955c591.tar.gz
strace-1d08dcf46dd4b2cfe3e27723c05b0aec9955c591.tar.bz2
strace-1d08dcf46dd4b2cfe3e27723c05b0aec9955c591.tar.xz
Merge iov fixes from Richard Kettlewell
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 6 insertions, 2 deletions
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 <fcntl.h>
+#if HAVE_SYS_UIO_H
#include <sys/uio.h>
+#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)