[Libwebsockets] i686-w64-mingw32 and Windows 7 (64bit): WSAPoll fails
"Andy Green (林安廸)"
andy at warmcat.com
Tue Mar 5 01:37:56 CET 2013
On 05/03/13 01:22, the mail apparently from Arokux B. included:
> it would be nice to add some error handling after a call to the poll.
> On Windows 7 (64bit), libwebsockets library compiled with
> i686-w64-mingw32 toolchain does not work. The example
> libwebsockets-test-server.exe returns immediately, due to -1 return
> value from libwebsocket_service and in turn from poll. I've digged a
> bit into it. The _WIN32 is defined, and the module Ws2_32.dll exists,
> getting an address to WSAPoll also succseeded. So as poll, WSAPoll is
> However a call to poll (that is WSAPoll) returns -1, and printing
> WSAGetLastError gives 10022, which means WSAEINVAL (Invalid argument).
> After falling to the emulated poll, the example works, so I can use
> this as a workaround.
> Unfortunately I have very limited knowledge of Windows platform, so if
> you want me to test it further, you'd need to give me precise
Likewise, I have no idea about that.
However I know it's workable for Visual Studio build with Joakim's
CMake, so I guess either everyone meets this and doesn't care, or the
visual studio build doesn't experience the problem.
Are people building for Visual Studio seeing this problem? If so we can
just use the emulated poll from the get-go.
More information about the Libwebsockets