Alfred Agrell (@Alcaro) commented about dlls/ntdll/unix/socket.c:
+ struct in6_pktinfo *info; + struct cmsghdr *cmsg; + unsigned int sum; + + if (recv_len < sizeof(*icmp_h)) return recv_len; + + memset( &ip_h, 0, sizeof(ip_h) ); + ip_h.src = unix_addr->in6.sin6_addr; + for (cmsg = CMSG_FIRSTHDR( hdr ); cmsg; cmsg = CMSG_NXTHDR( hdr, cmsg )) + { + if (cmsg->cmsg_level != IPPROTO_IPV6) continue; +#ifdef IPV6_PKTINFO + if (cmsg->cmsg_type != IPV6_PKTINFO) continue; + info = (struct in6_pktinfo *)CMSG_DATA( cmsg ); + ip_h.dst = info->ipi6_addr; +#endif Feels like some of those #ifdef should have a #else with an ERR or FIXME or something. Or at least a comment saying it's not necessary.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8757#note_112736