Commit b2443349 authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation on some architectures.

parent 8e2d951f
......@@ -649,7 +649,7 @@ static size_t dns_af_len(int af) {
return table[af];
} /* dns_af_len() */
#define dns_sa_family(sa) (((struct sockaddr *)(sa))->sa_family)
#define dns_sa_family(sa) (((struct sockaddr_storage *)(sa))->ss_family)
#define dns_sa_len(sa) dns_af_len(dns_sa_family(sa))
......
......@@ -145,7 +145,7 @@ static int on_udp_data(belle_sip_udp_listening_point_t *lp, unsigned int events)
belle_sip_channel_t *chan;
struct addrinfo ai={0};
belle_sip_address_remove_v4_mapping((struct sockaddr*)&addr,(struct sockaddr*)&addr,&addrlen);
ai.ai_family=((struct sockaddr*)&addr)->sa_family;
ai.ai_family=addr.ss_family;
ai.ai_addr=(struct sockaddr*)&addr;
ai.ai_addrlen=addrlen;
chan=_belle_sip_listening_point_get_channel((belle_sip_listening_point_t*)lp,NULL,&ai);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment