diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2010-04-07 14:16:14 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2010-04-07 14:16:14 +0000 |
| commit | 9fb7bf55841ffa941c8409364bedc218edc393bd (patch) | |
| tree | 2d2a4af7c3d6d5119e81cf7a099dd00a33b90580 | |
| parent | 6283dea5ca4c4e279dc7434788ac3205fcfe0561 (diff) | |
Notes
| -rw-r--r-- | sys/kern/uipc_syscalls.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 093107fad0f2..761e4ebfddf9 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mbuf.h> #include <sys/protosw.h> #include <sys/sf_buf.h> +#include <sys/sysent.h> #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/signalvar.h> @@ -69,6 +70,9 @@ __FBSDID("$FreeBSD$"); #ifdef KTRACE #include <sys/ktrace.h> #endif +#ifdef COMPAT_FREEBSD32 +#include <compat/freebsd32/freebsd32_util.h> +#endif #include <net/vnet.h> @@ -2513,7 +2517,13 @@ sctp_generic_sendmsg_iov(td, uap) if (error) goto sctp_bad1; - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); if (error) goto sctp_bad1; #ifdef KTRACE @@ -2615,10 +2625,15 @@ sctp_generic_recvmsg(td, uap) if (error) { return (error); } - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); - if (error) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); + if (error) goto out1; - } so = fp->f_data; #ifdef MAC |
