summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-29 19:27:46 +0200
committerAndreas Baumann <abaumann@yahoo.com>2009-03-29 19:27:46 +0200
commita709cc416a59b3e80ecf2969de6d2fc04734ebf9 (patch)
tree55837b2b838f0f38bc529d82eef62b7dd07f166e /tests
parentf1ee6c39b2aaddf3ed30794e6a0591c3f6c99793 (diff)
downloadwolfbones-a709cc416a59b3e80ecf2969de6d2fc04734ebf9.tar.gz
wolfbones-a709cc416a59b3e80ecf2969de6d2fc04734ebf9.tar.bz2
conditional compilation in test_getaddrinfo
Diffstat (limited to 'tests')
-rw-r--r--tests/port/test_getaddrinfo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/port/test_getaddrinfo.c b/tests/port/test_getaddrinfo.c
index f163189..530b518 100644
--- a/tests/port/test_getaddrinfo.c
+++ b/tests/port/test_getaddrinfo.c
@@ -13,6 +13,11 @@ int main( void ) {
int error;
char port_or_service[10];
+#ifdef _WIN32
+ WSADATA wsa_data;
+ WSAStartup( MAKEWORD( 2, 2 ), &wsa_data );
+#endif
+
/* tell getaddrinfo what we want */
memset( &hints, 0, sizeof( struct addrinfo ) );
hints.ai_flags = AI_PASSIVE;
@@ -48,6 +53,10 @@ int main( void ) {
}
freeaddrinfo( result );
+
+#ifdef _WIN32
+ WSACleanup( );
+#endif
return EXIT_SUCCESS;
}