diff --git a/tests/test_radio_dish.cpp b/tests/test_radio_dish.cpp index 7bfa722d6f..9c8174aa0e 100644 --- a/tests/test_radio_dish.cpp +++ b/tests/test_radio_dish.cpp @@ -321,7 +321,7 @@ static bool is_multicast_available (int ipv6_) struct sockaddr_in *mcast_ipv4 = &mcast.ipv4; any_ipv4->sin_family = AF_INET; - any_ipv4->sin_port = htons (5555); + any_ipv4->sin_port = htons (port); rc = test_inet_pton (AF_INET, "0.0.0.0", &any_ipv4->sin_addr); if (rc == 0) { @@ -395,15 +395,19 @@ static bool is_multicast_available (int ipv6_) msleep (SETTLE_TIME); - rc = sendto (send_sock, msg, static_cast (strlen (msg)), 0, +#ifdef ZMQ_HAVE_WINDOWS + rc = sendto (send_sock, msg, static_cast (strlen (msg)), 0, &mcast.generic, sl); +#else + rc = sendto (send_sock, msg, strlen (msg), 0, &mcast.generic, sl); +#endif if (rc < 0) { goto out; } msleep (SETTLE_TIME); - rc = recvfrom (bind_sock, buf, sizeof (buf) - 1, 0, NULL, 0); + rc = recvfrom (bind_sock, buf, sizeof (buf) - 1, MSG_DONTWAIT, NULL, 0); if (rc < 0) { goto out; }