Commit 99226c98 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

There is no such a thing as Winsock 2.0. Use version 2.2 instead.

Microsoft was probably too much afraid that developpers would request
version 0.2 instead of 2.0 so they switched straight from 1.1 to 2.2.
parent 77bec750
......@@ -84,40 +84,31 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
mdate();
/* WinSock Library Init. */
if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) )
{
/* Confirm that the WinSock DLL supports 2.0.*/
if( LOBYTE( Data.wVersion ) != 2 || HIBYTE( Data.wVersion ) != 0 )
if( !WSAStartup( MAKEWORD( 2, 2 ), &Data ) )
{
/* Aah, pretty useless check, we should always have Winsock 2.2
* since it appeared in Win98. */
if( LOBYTE( Data.wVersion ) != 2 || HIBYTE( Data.wVersion ) != 2 )
/* We could not find a suitable WinSock DLL. */
WSACleanup( );
}
else
{
/* Everything went ok. */
return;
}
}
/* Let's try with WinSock 1.1 */
if( !WSAStartup( MAKEWORD( 1, 1 ), &Data ) )
{
/* Confirm that the WinSock DLL supports 1.1.*/
if( LOBYTE( Data.wVersion ) != 1 || HIBYTE( Data.wVersion ) != 1 )
{
/* We could not find a suitable WinSock DLL. */
WSACleanup( );
}
else
{
/* Everything went ok. */
return;
}
}
fprintf( stderr, "error: can't initialize WinSocks\n" );
return;
}
/*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment