libpurple/win32/libc_interface.c

branch
release-2.2.2
changeset 20239
ae122f419324
parent 19859
71d37b57eff2
child 21389
e1dd8142bb87
--- 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;

mercurial