sdp: Conditionally compile code using AF_INET6
authorMartin Storsjö <martin@martin.st>
Tue, 19 Oct 2010 07:50:40 +0000 (07:50 +0000)
committerMartin Storsjö <martin@martin.st>
Tue, 19 Oct 2010 07:50:40 +0000 (07:50 +0000)
Should fix compilation in environments unaware of IPv6.

Originally committed as revision 25528 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/sdp.c

index 63169a9..35cbabc 100644 (file)
@@ -99,8 +99,10 @@ static int resolve_destination(char *dest_addr, int size, char *type,
         return 0;
     getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
                 NULL, 0, NI_NUMERICHOST);
+#ifdef AF_INET6
     if (ai->ai_family == AF_INET6)
         av_strlcpy(type, "IP6", type_size);
+#endif
     is_multicast = ff_is_multicast_address(ai->ai_addr);
     freeaddrinfo(ai);
     return is_multicast;