Apparently {{0}} is not enough ... let's not rely on structure
layout specifics here.
sizeof(greq));
#else
if (sock->type == AF_INET) {
- struct ip_mreq mreq = {{0}};
+ struct ip_mreq mreq;
struct in_addr addr;
+ memset(&mreq, 0, sizeof(struct ip_mreq));
assert(group_len == sizeof(struct sockaddr_in));
}
#if HAVE_IPV6
else if (sock->type == AF_INET6) {
- struct ipv6_mreq mreq = {{0}};
+ struct ipv6_mreq mreq;
+ memset(&mreq, 0, sizeof(struct ipv6_mreq));
assert(group_len == sizeof(struct sockaddr_in6));