From a709cc416a59b3e80ecf2969de6d2fc04734ebf9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 29 Mar 2009 19:27:46 +0200 Subject: conditional compilation in test_getaddrinfo --- tests/port/test_getaddrinfo.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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; } -- cgit v1.2.3-54-g00ecf