[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Libevent 2.0.8 crashes on Windows without WSAStartup



I've compiled libevent on windows 7 32bit with Mingw successfully.
Unfortunately when I run a few test programs, some of them will print:

[warn] evsig_init: socketpair: Successful WSAStartup not yet performed
[WSANOTINITIALISED ]
[warn] evthread_make_base_notifiable: socketpair: Successful
WSAStartup not yet performed [WSANOTINITIALISED ]
Couldn't get an event_base

I found out that the ones that didn't crash like bench_http.c had this
code right before calling event_base_new().

#ifdef WIN32
WSADATA WSAData;
WSAStartup(0x101, &WSAData);

I put that code in, and it seems to fix the problem. Is this intended
behavior? I feel that this code should be inside event_base_new().
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.