]> git.sesse.net Git - vlc/commitdiff
Compile fix + define undefined error value
authorChristophe Mutricy <xtophe@videolan.org>
Fri, 2 Mar 2007 18:51:48 +0000 (18:51 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Fri, 2 Mar 2007 18:51:48 +0000 (18:51 +0000)
src/network/getaddrinfo.c

index 40d6a0ce37b09cbf179af2cb85b940afa23ac9d9..8f76de859509cc1477c8f4b74f48c42fe23aff33 100644 (file)
@@ -53,6 +53,9 @@
 #ifndef AF_UNSPEC
 #   define AF_UNSPEC   0
 #endif
+#ifndef EAI_OVERFLOW
+#   define EAI_OVERFLOW -12   /* Argument buffer overflow.  */
+#endif
 
 #define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
                   NI_DGRAM)
@@ -171,7 +174,7 @@ __getnameinfo( const struct sockaddr *sa, socklen_t salen,
             }
 
             /* inet_ntoa() is not thread-safe, do not use it */
-            uint32_t ipv4 = ntohl (addr->sin_addr);
+            uint32_t ipv4 = ntohl (addr->sin_addr.s_addr);
 
             if (snprintf (host, hostlen, "%u.%u.%u.%u", ipv4 >> 24,
                           (ipv4 >> 16) & 0xff, (ipv4 >> 8) & 0xff,