* autoload.cc (wsock_init): Properly define WSAStartup function pointer to

avoid stack damage.
This commit is contained in:
Christopher Faylor
2011-02-05 19:38:21 +00:00
parent 103e45ba4d
commit 63398011f9
2 changed files with 7 additions and 2 deletions

View File

@ -294,10 +294,10 @@ wsock_init ()
if (!wsock_started)
{
int (*wsastartup) (int, WSADATA *);
int __stdcall (*wsastartup) (int, WSADATA *);
/* Don't use autoload to load WSAStartup to eliminate recursion. */
wsastartup = (int (*)(int, WSADATA *))
wsastartup = (int __stdcall (*)(int, WSADATA *))
GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
if (wsastartup)
{