Browse Source

avformat/tcp: Put struct sockaddr_in6 under #if

Fixes: error: dereferencing pointer to incomplete type

Tested-by: Dave Yeo <daveryeo@telus.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3
Michael Niedermayer 9 years ago
parent
commit
c6bc823eea
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/tcp.c

+ 2
- 0
libavformat/tcp.c View File

@@ -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,


Loading…
Cancel
Save