Eyescale/Equalizer — comment on commit 40065c38bade31094eb07b98da376baaa0e2202f
File:  line 0
By dardok:

How about type-punning?

union
{
struct sockaddr addr;
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
struct sockaddr_storage storage;
} any;

memset( (void *)&any, 0, sizeof(any) );
struct sockaddr_in6 *sin6 = &any.sin6;
sin6->sin6_family = AF_INET6;
sin6->sin6_port = htons( _description->port );
sin6->sin6_addr = in6addr_any;