diff options
author | Bert Belder <bertbelder@gmail.com> | 2010-11-25 01:43:20 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-11-30 10:47:48 +0300 |
commit | 4c16dd7c5c7d048ec91c30c1afb783c4b2c03a60 (patch) | |
tree | aaca9e7c87feb93aab6123663cd94c5d8a48e78c /deps | |
parent | 4476ce04dc39f07edc97ca0312fdaf2492d04fe7 (diff) |
win: Make libev use send instead of write for sockets
It looks like MINGW doesn't like to write() to sockets.
If wrong, revert this patch
Diffstat (limited to 'deps')
-rw-r--r-- | deps/libev/ev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/libev/ev.c b/deps/libev/ev.c index 353470bbf2d..59b5e23306c 100644 --- a/deps/libev/ev.c +++ b/deps/libev/ev.c @@ -1289,7 +1289,11 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag) /* so when you think this write should be a send instead, please find out */ /* where your send() is from - it's definitely not the microsoft send, and */ /* tell me. thank you. */ +#ifdef __MINGW32__ + send(EV_FD_TO_WIN32_HANDLE(evpipe [1]), &dummy, 1, 0); +#else write (evpipe [1], &dummy, 1); +#endif errno = old_errno; } @@ -1313,7 +1317,11 @@ pipecb (EV_P_ ev_io *iow, int revents) { char dummy; /* see discussion in evpipe_write when you think this read should be recv in win32 */ +#ifdef __MINGW32__ + recv(EV_FD_TO_WIN32_HANDLE(evpipe [0]), &dummy, 1, 0); +#else read (evpipe [0], &dummy, 1); +#endif } if (sig_pending) |