diff options
Diffstat (limited to 'src/fe-text/irssi.c')
-rw-r--r-- | src/fe-text/irssi.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index dd567f28..a7e91274 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -223,10 +223,27 @@ static void check_files(void) g_free(path); } +#ifdef WIN32 +static void winsock_init(void) +{ + WORD wVersionRequested; + WSADATA wsaData; + + wVersionRequested = MAKEWORD(2, 2); + + if (WSAStartup(wVersionRequested, &wsaData) != 0) { + printf("Error initializing winsock\n"); + exit(1); + } +} +#endif + int main(int argc, char **argv) { check_files(); - +#ifdef WIN32 + winsock_init(); +#endif #ifdef HAVE_SOCKS SOCKSinit(argv[0]); #endif |