mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-26 05:04:14 +00:00
build: fix gcc-4.4.0 build failures (FSCORE-355)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13395 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
1287948750
commit
85317633dc
4 files changed
+16
-12
No files matched your search
+2
-1
@@ -549,7 +549,8 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
|
||||
case SWITCH_STUN_ATTR_MAPPED_ADDRESS:
|
||||
if (attr->type) {
|
||||
if (funny) {
|
||||
((switch_stun_ip_t *) attr->value)->address ^= ntohl(0xabcdabcd);
|
||||
switch_stun_ip_t *tmp = (switch_stun_ip_t *)attr->value;
|
||||
tmp->address ^= ntohl(0xabcdabcd);
|
||||
}
|
||||
switch_stun_packet_attribute_get_mapped_address(attr, rip, &rport);
|
||||
}
|
||||
|
||||
+5
-4
@@ -1151,14 +1151,15 @@ SWITCH_DECLARE(int) switch_build_uri(char *uri,
|
||||
int flags)
|
||||
{
|
||||
char host[NI_MAXHOST], serv[NI_MAXSERV];
|
||||
struct sockaddr_storage ss;
|
||||
struct sockaddr_in6 si6;
|
||||
const struct sockaddr *addr;
|
||||
const char *colon;
|
||||
|
||||
if (flags & SWITCH_URI_NO_SCOPE && sa->family == AF_INET6) {
|
||||
memcpy(&ss, &sa->sa, sa->salen);
|
||||
((struct sockaddr_in6*) (intptr_t) &ss)->sin6_scope_id = 0;
|
||||
addr = (const struct sockaddr*) (intptr_t)&ss;
|
||||
memcpy(&si6, &sa->sa, sa->salen);
|
||||
si6.sin6_scope_id = 0;
|
||||
|
||||
addr = (const struct sockaddr*) &si6;
|
||||
} else {
|
||||
addr = (const struct sockaddr*) (intptr_t)&sa->sa;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user