--- a/libpurple/win32/libc_interface.c Sun Oct 21 04:44:56 2007 +0000 +++ b/libpurple/win32/libc_interface.c Sun Oct 21 04:46:33 2007 +0000 @@ -138,12 +138,22 @@ /* fcntl.h */ /* This is not a full implementation of fcntl. Update as needed.. */ -int wpurple_fcntl(int socket, int command, int val) { +int wpurple_fcntl(int socket, int command, ...) { + switch( command ) { + case F_GETFL: + return 0; + case F_SETFL: { + va_list args; + int val; int ret=0; + va_start(args, command); + val = va_arg(args, int); + va_end(args); + switch( val ) { case O_NONBLOCK: { @@ -152,7 +162,7 @@ break; } case 0: - { + { u_long imode=0; ret = ioctlsocket(socket, FIONBIO, &imode); break;