iov[0].iov_base = buf; iov[0].iov_len = cnt;
iov.iov_base = data; iov.iov_len = cnt;
__msgread (int sock, void *buf, size_t cnt){  struct iovec iov[1];  struct msghdr msg;#ifdef SCM_CREDENTIALS  struct cmessage cm;#endif  iov[0].iov_base = buf;  iov[0].iov_len = cnt;  msg.msg_iov = iov;  msg.msg_iovlen = 1;  msg.msg_name = NULL;  msg.msg_namelen = 0;#ifdef SCM_CREDENTIALS  msg.msg_control = (caddr_t)&cm;  msg.msg_controllen = sizeof(struct cmessage);#endif  msg.msg_flags = 0;#ifdef SO_PASSCRED  {    int on = 1;    if (setsockopt (sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)))      return -1;  }#endif  return recvmsg (sock, &msg, 0);}