| 866 | } |
| 867 | |
| 868 | int |
| 869 | osendmsg(struct thread *td, struct osendmsg_args *uap) |
| 870 | { |
| 871 | struct msghdr msg; |
| 872 | struct iovec *iov; |
| 873 | int error; |
| 874 | |
| 875 | error = copyin(uap->msg, &msg, sizeof (struct omsghdr)); |
| 876 | if (error != 0) |
| 877 | return (error); |
| 878 | error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); |
| 879 | if (error != 0) |
| 880 | return (error); |
| 881 | msg.msg_iov = iov; |
| 882 | msg.msg_flags = MSG_COMPAT; |
| 883 | error = sendit(td, uap->s, &msg, uap->flags); |
| 884 | free(iov, M_IOV); |
| 885 | return (error); |
| 886 | } |
| 887 | #endif |
| 888 | |
| 889 | int |