mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-30 03:13:18 +00:00
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>
This commit is contained in:
parent
0e66dcd733
commit
c6bc823eea
@ -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…
Reference in New Issue
Block a user