--- libev/ev.c 2007/12/25 07:05:45 1.199 +++ libev/ev.c 2007/12/26 08:06:09 1.200 @@ -602,7 +602,11 @@ if (events) { unsigned long argp; - anfd->handle = _get_osfhandle (fd); + #ifdef EV_FD_TO_WIN32_HANDLE + anfd->handle = EV_FD_TO_WIN32_HANDLE (fd); + #else + anfd->handle = _get_osfhandle (fd); + #endif assert (("libev only supports socket fds in this configuration", ioctlsocket (anfd->handle, FIONREAD, &argp) == 0)); } #endif