diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-29 19:27:46 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-29 19:27:46 +0200 |
commit | a709cc416a59b3e80ecf2969de6d2fc04734ebf9 (patch) | |
tree | 55837b2b838f0f38bc529d82eef62b7dd07f166e /tests | |
parent | f1ee6c39b2aaddf3ed30794e6a0591c3f6c99793 (diff) | |
download | wolfbones-a709cc416a59b3e80ecf2969de6d2fc04734ebf9.tar.gz wolfbones-a709cc416a59b3e80ecf2969de6d2fc04734ebf9.tar.bz2 |
conditional compilation in test_getaddrinfo
Diffstat (limited to 'tests')
-rw-r--r-- | tests/port/test_getaddrinfo.c | 9 |
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; } |