Assume non-broken recvmsg

This commit is contained in:
Ondřej Surý
2018-08-21 15:29:49 +02:00
parent 1672935717
commit a11a271b28
4 changed files with 0 additions and 87 deletions

View File

@@ -1591,26 +1591,8 @@ build_msghdr_recv(isc__socket_t *sock, char *cmsgbuf, isc_socketevent_t *dev,
if (sock->type == isc_sockettype_udp) {
memset(&dev->address, 0, sizeof(dev->address));
#ifdef BROKEN_RECVMSG
if (sock->pf == AF_INET) {
msg->msg_name = (void *)&dev->address.type.sin;
msg->msg_namelen = sizeof(dev->address.type.sin6);
} else if (sock->pf == AF_INET6) {
msg->msg_name = (void *)&dev->address.type.sin6;
msg->msg_namelen = sizeof(dev->address.type.sin6);
#ifdef ISC_PLATFORM_HAVESYSUNH
} else if (sock->pf == AF_UNIX) {
msg->msg_name = (void *)&dev->address.type.sunix;
msg->msg_namelen = sizeof(dev->address.type.sunix);
#endif
} else {
msg->msg_name = (void *)&dev->address.type.sa;
msg->msg_namelen = sizeof(dev->address.type);
}
#else
msg->msg_name = (void *)&dev->address.type.sa;
msg->msg_namelen = sizeof(dev->address.type);
#endif
} else { /* TCP */
msg->msg_name = NULL;
msg->msg_namelen = 0;