Commit 24a100c0 authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/httpd.c: ipv6 win32 fix.

parent cc0c26f4
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
# endif # endif
#endif #endif
#if defined(WIN32)
static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
#endif
#if 0 #if 0
typedef struct httpd_t httpd_t; typedef struct httpd_t httpd_t;
...@@ -1011,8 +1015,7 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port ) ...@@ -1011,8 +1015,7 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port )
sizeof( struct in6_addr ) ) ) ) sizeof( struct in6_addr ) ) ) )
continue; /* does not match */ continue; /* does not match */
} }
else else if( res->ai_family == PF_INET6 )
if( res->ai_family == PF_INET6 )
continue; continue;
else else
#endif #endif
...@@ -1028,8 +1031,7 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port ) ...@@ -1028,8 +1031,7 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port )
p_hsock->sin_addr.s_addr != p_sock->sin_addr.s_addr ) ) p_hsock->sin_addr.s_addr != p_sock->sin_addr.s_addr ) )
continue; /* does not match */ continue; /* does not match */
} }
else else if( res->ai_family == PF_INET )
if( res->ai_family == PF_INET )
continue; continue;
else else
{ {
...@@ -1487,6 +1489,7 @@ char* httpd_ClientIP( httpd_client_t *cl ) ...@@ -1487,6 +1489,7 @@ char* httpd_ClientIP( httpd_client_t *cl )
} }
return strdup( &sz_ip[1] ); return strdup( &sz_ip[1] );
#else #else
/* FIXME not thread safe */ /* FIXME not thread safe */
return strdup( inet_ntoa( ((const struct sockaddr_in *)&cl->sock)->sin_addr ) ); return strdup( inet_ntoa( ((const struct sockaddr_in *)&cl->sock)->sin_addr ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment