Commit 82c8fccd authored by Mike Jerris's avatar Mike Jerris

sres.c: fix gcc-4.4.0 build failures (FSCORE-355)

Ignore-this: 6cde4d7bbaf48e1dbe0bd600d954e767

darcs-hash:20090601183324-46e70-9b339dcedbcc4eb36589e73ed1edae16ff206afb.gz
parent cbc55273
......@@ -3486,15 +3486,17 @@ void sres_log_response(sres_resolver_t const *res,
if (from == NULL)
;
else if (from->ss_family == AF_INET) {
struct sockaddr_in const *sin = (void *)from;
su_inet_ntop(AF_INET, &sin->sin_addr, host, sizeof host);
port = sin->sin_port;
struct sockaddr_in sin;
memcpy(&sin, from, sizeof sin);
su_inet_ntop(AF_INET, &sin.sin_addr, host, sizeof host);
port = sin.sin_port;
}
#if HAVE_SIN6
else if (from->ss_family == AF_INET6) {
struct sockaddr_in6 const *sin6 = (void *)from;
su_inet_ntop(AF_INET6, &sin6->sin6_addr, host, sizeof host);
port = sin6->sin6_port;
struct sockaddr_in6 sin6;
memcpy(&sin6, from, sizeof sin6);
su_inet_ntop(AF_INET6, &sin6.sin6_addr, host, sizeof host);
port = sin6.sin6_port;
}
#endif
......
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