summaryrefslogtreecommitdiff
path: root/tests/port
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-29 16:46:46 +0200
committerAndreas Baumann <abaumann@yahoo.com>2009-03-29 16:46:46 +0200
commit0b6f512e8e37935481de1d11b90c739070cb2565 (patch)
treea7499b355003f3f6d081fe6d7cc1132bc0fe96f7 /tests/port
parentcb1119666a3a4273fa53743837b2e13f6730bc10 (diff)
downloadwolfbones-0b6f512e8e37935481de1d11b90c739070cb2565.tar.gz
wolfbones-0b6f512e8e37935481de1d11b90c739070cb2565.tar.bz2
added stub implementation of getaddrinfo on Cygwin
Diffstat (limited to 'tests/port')
-rw-r--r--tests/port/test_getaddrinfo.c4
1 files changed, 4 insertions, 0 deletions
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 );