diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2011-11-09 20:47:52 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2011-11-09 20:47:52 +0100 |
commit | 67ae21a73302e0676fa3f0d25210c58350d89042 (patch) | |
tree | 0407d3fb01b4d52dc0f6f8f707d53cdf61e635b9 /tests/port/test_getaddrinfo.c | |
parent | 404e05db0773d1b7f50bf2fc1403d71328aa50e0 (diff) | |
download | wolfbones-67ae21a73302e0676fa3f0d25210c58350d89042.tar.gz wolfbones-67ae21a73302e0676fa3f0d25210c58350d89042.tar.bz2 |
fixed on Windows
Diffstat (limited to 'tests/port/test_getaddrinfo.c')
-rw-r--r-- | tests/port/test_getaddrinfo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/port/test_getaddrinfo.c b/tests/port/test_getaddrinfo.c index 24fc19b..3de47b8 100644 --- a/tests/port/test_getaddrinfo.c +++ b/tests/port/test_getaddrinfo.c @@ -28,17 +28,16 @@ int main( int argc, char **argv ) { struct addrinfo *result; struct addrinfo *res; int error; +#ifdef _WIN32 + WSADATA wsa_data; + WSAStartup( MAKEWORD( 2, 2 ), &wsa_data ); +#endif if( argc != 3 ) { fputs( "usage: test_getaddrinfo <host> <port>\n", stderr ); exit( EXIT_FAILURE ); } -#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; |