[Bug 43986] Wocky fails to cross compile with mingw32

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 22 18:46:51 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=43986

--- Comment #6 from Jonny Lamb <jonny.lamb at collabora.co.uk> 2011-12-22 09:46:51 PST ---
(In reply to comment #5)
> patch updated, how does it look now :) ?

Oh, sorry I completely missed this in the first review:

+ #ifdef G_OS_WIN32
+   u_long mode = 0;
+   WSAEventSelect( csock, 0, 0);
+   ioctlsocket (csock, FIONBIO, &mode);
+ #else
    flags = fcntl (csock, F_GETFL );
    flags = flags & ~O_NONBLOCK;
    fcntl (csock, F_SETFL, flags);
+ #endif

Two things:

 1. the opening bracket is in the wrong place in: WSAEventSelect( csock, 0, 0).
Actually it looks like it's in the wrong place for fnctl too; could you fix
that too while you're there? :-)
 2. you should declare "u_long mode" earlier in the function so you don't have
declarations after method calls. It might not be strictly necessary for the
mingw32 compiler but it's the C90 style we're using throughout.

Thanks, otherwise it looks fine.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list