diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-06 21:10:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-06 21:29:12 +0100 |
commit | c6bc823eea6a7f6aaca14ee8a141277ea285e0f3 (patch) | |
tree | 289c68690becaf2d589eb9a375b69f2dfdf55dd0 /libavformat | |
parent | 0e66dcd733d08f32af5184e2da3b81d338a88325 (diff) | |
download | ffmpeg-c6bc823eea6a7f6aaca14ee8a141277ea285e0f3.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/tcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index fd10a56eff..25abafc5eb 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -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, |