ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sun 
Nov  6 21:10:24 2016 +0100| [c6bc823eea6a7f6aaca14ee8a141277ea285e0f3] | 
committer: Michael Niedermayer

avformat/tcp: Put struct sockaddr_in6 under #if

Fixes: error: dereferencing pointer to incomplete type

Tested-by: Dave Yeo <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6bc823eea6a7f6aaca14ee8a141277ea285e0f3
---

 libavformat/tcp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index fd10a56..25abafc 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,

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to