mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 19:40:06 +00:00
[core] fix build when undefined APR_INET6
This commit is contained in:
parent
ac5775b6e0
commit
56478e0248
@ -848,13 +848,16 @@ SWITCH_DECLARE(switch_status_t) switch_sockaddr_new(switch_sockaddr_t ** sa, con
|
|||||||
|
|
||||||
new_sa->pool = pool;
|
new_sa->pool = pool;
|
||||||
|
|
||||||
|
#if APR_HAVE_IPV6
|
||||||
if (strchr(ip, ':')) {
|
if (strchr(ip, ':')) {
|
||||||
struct sockaddr_in6 sa6 = { 0 };
|
struct sockaddr_in6 sa6 = { 0 };
|
||||||
|
|
||||||
family = APR_INET6;
|
family = APR_INET6;
|
||||||
inet_pton(family, ip, &(sa6.sin6_addr));
|
inet_pton(family, ip, &(sa6.sin6_addr));
|
||||||
memcpy(&new_sa->sa, &sa6, sizeof(struct sockaddr_in6));
|
memcpy(&new_sa->sa, &sa6, sizeof(struct sockaddr_in6));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
struct sockaddr_in sa4 = { 0 };
|
struct sockaddr_in sa4 = { 0 };
|
||||||
|
|
||||||
family = APR_INET;
|
family = APR_INET;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user