| 887 | #endif |
| 888 | |
| 889 | int |
| 890 | sys_sendmsg(struct thread *td, struct sendmsg_args *uap) |
| 891 | { |
| 892 | struct msghdr msg; |
| 893 | struct iovec *iov; |
| 894 | int error; |
| 895 | |
| 896 | error = copyin(uap->msg, &msg, sizeof (msg)); |
| 897 | if (error != 0) |
| 898 | return (error); |
| 899 | error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); |
| 900 | if (error != 0) |
| 901 | return (error); |
| 902 | msg.msg_iov = iov; |
| 903 | #ifdef COMPAT_OLDSOCK |
| 904 | if (SV_PROC_FLAG(td->td_proc, SV_AOUT)) |
| 905 | msg.msg_flags = 0; |
| 906 | #endif |
| 907 | error = sendit(td, uap->s, &msg, uap->flags); |
| 908 | free(iov, M_IOV); |
| 909 | return (error); |
| 910 | } |
| 911 | |
| 912 | int |
| 913 | kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, |