- if (WSARecvFrom (s, buf, sizeof (buf) / sizeof (buf[0]), &recvd, flags,
- hdr->msg_name, hdr->msg_namelen, NULL, NULL) == 0)
+ int ret = WSARecvFrom (s, buf, sizeof (buf) / sizeof (buf[0]), &recvd,
+ &dwFlags, hdr->msg_name, &fromlen, NULL, NULL);
+ hdr->msg_namelen = fromlen;
+ hdr->msg_flags = dwFlags;
+ if (ret == 0)