Mercurial > pidgin.yaz
changeset 3646:bfd8df165f32
[gaim-migrate @ 3770]
win32 fix
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Fri, 11 Oct 2002 19:30:22 +0000 |
parents | 6278486dc21d |
children | 9e68fa94c90e |
files | src/protocols/oscar/ft.c |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/ft.c Fri Oct 11 17:35:23 2002 +0000 +++ b/src/protocols/oscar/ft.c Fri Oct 11 19:30:22 2002 +0000 @@ -17,11 +17,14 @@ #include <netinet/in.h> #include <sys/utsname.h> /* for aim_directim_initiate */ #include <arpa/inet.h> /* for inet_ntoa */ -#else +#endif + +#include "gaim.h" + +#ifdef _WIN32 #include "win32dep.h" #endif -#include "gaim.h" /* TODO: o look for memory leaks.. there's going to be shitloads, i'm sure. @@ -965,6 +968,9 @@ int listenfd; const int on = 1; struct sockaddr_in sockin; +#ifdef _WIN32 + u_long imode; +#endif if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket(listenfd)"); @@ -1003,7 +1009,12 @@ #endif return -1; } +#ifndef _WIN32 fcntl(listenfd, F_SETFL, O_NONBLOCK); +#else + imode = 1; + ioctlsocket(listenfd, FIONBIO, &imode); +#endif return listenfd; #endif }