trying to compile rev [based on libev] for mingw in windows, I sent it
fd "3" [an accepting socket]
and got
Assertion failed: ("libev only supports socket fds in this
configuration ", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0),
file ../libev/ev.c, line 729
where apparently anfd->handle was equal to 1956 [calling ioctlsocket
with 3 works]
Not sure if this is the right fix, but here's an attempt:
diff --git a/ext/libev/ev.c b/ext/libev/ev.c
index a8b434f..14f4075 100644
--- a/ext/libev/ev.c
+++ b/ext/libev/ev.c
@@ -718,9 +718,10 @@ fd_reify (EV_P)
#ifdef EV_FD_TO_WIN32_HANDLE
anfd->handle = EV_FD_TO_WIN32_HANDLE (fd);
#else
- anfd->handle = _get_osfhandle (fd);
+ anfd->handle = fd;
#endif
- assert (("libev only supports socket fds in this
configuration", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0));
+
+ assert (("libev only supports socket fds in this
configuration ", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0));
}
#endif
Thoughts?
Thanks!
-=R
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev