summaryrefslogtreecommitdiff
path: root/tests/port/test_getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/port/test_getaddrinfo.c')
-rw-r--r--tests/port/test_getaddrinfo.c9
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;