summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-11 05:42:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-11 05:42:02 +0000
commit9be12728c6516a0da6b479cd0eefd0bfc61c8cff (patch)
tree55bc0e7761ab0474db6f1ab1c8a20e5e790064d1 /sys
parentcb4f89c64d6b930d3f8f91caefc799d2d510d0b5 (diff)
compile if iov_base is void *
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_subr.c4
-rw-r--r--sys/nfs/nfs_vnops.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 39ca21dabbc..56b07f7d0e7 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_subr.c,v 1.4 1997/02/24 14:19:56 niklas Exp $ */
+/* $OpenBSD: kern_subr.c,v 1.5 1998/05/11 05:41:59 deraadt Exp $ */
/* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */
/*
@@ -130,7 +130,7 @@ again:
break;
case UIO_SYSSPACE:
- *iov->iov_base = c;
+ *(char *)iov->iov_base = c;
break;
}
iov->iov_base++;
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 76cb0d40c1d..aaa1285a392 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.19 1997/12/02 16:57:59 csapuntz Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.20 1998/05/11 05:42:01 deraadt Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -1959,7 +1959,7 @@ nfs_readdir(v)
u_long *cookies;
/* XXX - over-estimate - see UFS code for how to do it
right */
- int ncookies = (uio->uio_iov->iov_base - base) / 12;
+ int ncookies = ((caddr_t)uio->uio_iov->iov_base - base) / 12;
MALLOC(cookies, u_long *, sizeof(*cookies) * ncookies,
M_TEMP, M_WAITOK);
@@ -1972,7 +1972,7 @@ nfs_readdir(v)
*/
if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
panic("nfs_readdir: lost in space");
- while (ncookies-- && base < uio->uio_iov->iov_base) {
+ while (ncookies-- && base < (caddr_t)uio->uio_iov->iov_base) {
dp = (struct dirent *) base;
if (dp->d_reclen == 0)
break;
@@ -1982,8 +1982,8 @@ nfs_readdir(v)
}
*ap->a_ncookies -= ncookies;
- uio->uio_resid += (uio->uio_iov->iov_base - base);
- uio->uio_iov->iov_len += (uio->uio_iov->iov_base - base);
+ uio->uio_resid += ((caddr_t)uio->uio_iov->iov_base - base);
+ uio->uio_iov->iov_len += ((caddr_t)uio->uio_iov->iov_base - base);
uio->uio_iov->iov_base = base;
}
@@ -2092,7 +2092,7 @@ nfs_readdirrpc(vp, uiop, cred)
left = NFS_READDIRBLKSIZ - blksiz;
if ((tlen + DIRHDSIZ) > left) {
dp->d_reclen += left;
- uiop->uio_iov->iov_base += left;
+ (caddr_t)uiop->uio_iov->iov_base += left;
uiop->uio_iov->iov_len -= left;
uiop->uio_offset += left;
uiop->uio_resid -= left;
@@ -2111,13 +2111,13 @@ nfs_readdirrpc(vp, uiop, cred)
blksiz = 0;
uiop->uio_offset += DIRHDSIZ;
uiop->uio_resid -= DIRHDSIZ;
- uiop->uio_iov->iov_base += DIRHDSIZ;
+ (caddr_t)uiop->uio_iov->iov_base += DIRHDSIZ;
uiop->uio_iov->iov_len -= DIRHDSIZ;
nfsm_mtouio(uiop, len);
cp = uiop->uio_iov->iov_base;
tlen -= len;
*cp = '\0'; /* null terminate */
- uiop->uio_iov->iov_base += tlen;
+ (caddr_t)uiop->uio_iov->iov_base += tlen;
uiop->uio_iov->iov_len -= tlen;
uiop->uio_offset += tlen;
uiop->uio_resid -= tlen;