forked from mirrors/tftp-hpa-google
Cast IPv6 address from SOCKADDR_P() to struct in6_addr *
We need to cast IPv6 addresses from SOCKADDR_P() to struct in6_addr * on some platforms, including at least MacOS X.
This commit is contained in:
parent
12996491c2
commit
b0a2a17864
1 changed files with 4 additions and 3 deletions
|
@ -841,9 +841,10 @@ int main(int argc, char **argv)
|
|||
sizeof(bindaddr4.sin_addr));
|
||||
#ifdef HAVE_IPV6
|
||||
} else if ((from.sa.sa_family == AF_INET6) &&
|
||||
IN6_IS_ADDR_UNSPECIFIED(SOCKADDR_P(&myaddr))) {
|
||||
memcpy(SOCKADDR_P(&myaddr), &bindaddr6.sin6_addr,
|
||||
sizeof(bindaddr6.sin6_addr));
|
||||
IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *)
|
||||
SOCKADDR_P(&myaddr))) {
|
||||
memcpy(SOCKADDR_P(&myaddr), &bindaddr6.sin6_addr,
|
||||
sizeof(bindaddr6.sin6_addr));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue