diff --git a/src/core/ddsi/src/ddsi_udp.c b/src/core/ddsi/src/ddsi_udp.c index 5efd60b4a1..b723d83ad9 100644 --- a/src/core/ddsi/src/ddsi_udp.c +++ b/src/core/ddsi/src/ddsi_udp.c @@ -49,6 +49,9 @@ DDSRT_STATIC_ASSERT (DDSI_LOCATOR_UDPv4MCGEN_INDEX_MASK_BITS <= 32 - UDP_MC_ADDR # endif #endif #ifndef PACKET_DESTINATION_INFO +# if defined (__MINGW32__) && !defined (CMSG_SPACE) +# define PACKET_DESTINATION_INFO 0 +# endif # if defined CMSG_SPACE && (defined IP_PKTINFO || (DDSRT_HAVE_IPV6 && defined IPV6_PKTINFO)) # define PACKET_DESTINATION_INFO 1 # else diff --git a/src/ddsrt/src/sockets/windows/socket.c b/src/ddsrt/src/sockets/windows/socket.c index a875d18f03..cf80213564 100644 --- a/src/ddsrt/src/sockets/windows/socket.c +++ b/src/ddsrt/src/sockets/windows/socket.c @@ -570,6 +570,7 @@ ddsrt_recvmsg( if (sockext->wsarecvmsg (sockext->sock, &wsamsg, &n, NULL, 0) != 0) { int err = WSAGetLastError(); + *rcvd = (ssize_t) n; return recv_error_to_retcode(err); } else