* 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

@ -1,3 +1,8 @@
2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
* autoload.cc (wsock_init): Properly define WSAStartup function pointer
to avoid stack damage.
2011-02-02 Corinna Vinschen <corinna@vinschen.de>
* libc/bsdlib.cc: Include err.h.

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)
{