From 0b6f512e8e37935481de1d11b90c739070cb2565 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 29 Mar 2009 16:46:46 +0200 Subject: added stub implementation of getaddrinfo on Cygwin --- tests/port/test_getaddrinfo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/port') diff --git a/tests/port/test_getaddrinfo.c b/tests/port/test_getaddrinfo.c index df2be22..b18d49d 100644 --- a/tests/port/test_getaddrinfo.c +++ b/tests/port/test_getaddrinfo.c @@ -34,7 +34,9 @@ int main( void ) { for( res = result; res != NULL; res = res->ai_next ) { char s[100]; const struct sockaddr_in *addr_ipv4; +#ifdef HAVE_IPV6 const struct sockaddr_in6 *addr_ipv6; +#endif memset( s, 0, 100 ); switch( res->ai_family ) { @@ -43,10 +45,12 @@ int main( void ) { inet_ntop( res->ai_family, &addr_ipv4->sin_addr, s, 100 ); break; +#ifdef HAVE_IPV6 case AF_INET6: addr_ipv6 = (const struct sockaddr_in6 *)((void *)res->ai_addr); inet_ntop( res->ai_family, &addr_ipv6->sin6_addr, s, 100 ); break; +#endif } printf( "%d %d %s\n", res->ai_family, res->ai_socktype, s ); -- cgit v1.2.3-54-g00ecf