diff --git a/iocallback.c b/iocallback.c index dba7235..5976636 100644 --- a/iocallback.c +++ b/iocallback.c @@ -182,7 +182,27 @@ static gboolean IO_check(GSource *source) */ #ifdef _WIN32 - #error AQUI + fd_set rfds, wfds, xfds; + struct timeval tm; + + memset(&tm,0,sizeof(tm)); + + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&xfds); + + if(((IO_Source *) source)->poll.events & G_IO_IN) + { + FD_SET(((IO_Source *) source)->poll.fd, &rfds); + } + + if(((IO_Source *) source)->poll.events & G_IO_OUT) + { + FD_SET(((IO_Source *) source)->poll.fd, &wfds); + } + + if(select(((IO_Source *) source)->poll.fd+1, &rfds, &wfds, &xfds, &tm) > 0) + return TRUE; #else -- libgit2 0.21.2