diff --git a/src/udp/mcast.c b/src/udp/mcast.c index 429479b8d..d0e9a985b 100644 --- a/src/udp/mcast.c +++ b/src/udp/mcast.c @@ -13,9 +13,7 @@ static int multicast_update(struct udp_sock *us, const struct sa *group, bool join) { struct ip_mreq mreq; -#ifdef HAVE_INET6 struct ipv6_mreq mreq6; -#endif int err; if (!us || !group) @@ -34,7 +32,6 @@ static int multicast_update(struct udp_sock *us, const struct sa *group, &mreq, sizeof(mreq)); break; -#ifdef HAVE_INET6 case AF_INET6: mreq6.ipv6mr_multiaddr = group->u.in6.sin6_addr; mreq6.ipv6mr_interface = sa_scopeid(group); @@ -45,7 +42,6 @@ static int multicast_update(struct udp_sock *us, const struct sa *group, : IPV6_LEAVE_GROUP, &mreq6, sizeof(mreq6)); break; -#endif default: return EAFNOSUPPORT; diff --git a/src/udp/udp.c b/src/udp/udp.c index 18b58d8f3..7a7f9cb52 100644 --- a/src/udp/udp.c +++ b/src/udp/udp.c @@ -285,11 +285,7 @@ int udp_listen(struct udp_sock **usp, const struct sa *local, (void)re_snprintf(serv, sizeof(serv), "%u", sa_port(local)); } else { -#ifdef HAVE_INET6 af = AF_UNSPEC; -#else - af = AF_INET; -#endif } memset(&hints, 0, sizeof(hints));