Commit c6bc823e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/tcp: Put struct sockaddr_in6 under #if

Fixes: error: dereferencing pointer to incomplete type
Tested-by: 's avatarDave Yeo <daveryeo@telus.net>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0e66dcd7
......@@ -122,6 +122,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
cur_ai = ai;
restart:
#if HAVE_STRUCT_SOCKADDR_IN6
// workaround for IOS9 getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve port number.
if (cur_ai->ai_family == AF_INET6){
struct sockaddr_in6 * sockaddr_v6 = (struct sockaddr_in6 *)cur_ai->ai_addr;
......@@ -129,6 +130,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
sockaddr_v6->sin6_port = htons(port);
}
}
#endif
fd = ff_socket(cur_ai->ai_family,
cur_ai->ai_socktype,
......
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