diff options
-rw-r--r-- | ev.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1419,7 +1419,7 @@ evpipe_init (EV_P) } } -inline_size void +inline_speed void evpipe_write (EV_P_ EV_ATOMIC_T *flag) { if (!*flag) @@ -1430,11 +1430,12 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag) if (pipe_write_wanted) { - int old_errno = errno; /* save errno because write will clobber it */ - char dummy; + int old_errno; pipe_write_skipped = 0; + old_errno = errno; /* save errno because write will clobber it */ + #if EV_USE_EVENTFD if (evfd >= 0) { @@ -1449,7 +1450,7 @@ 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. */ - write (evpipe [1], &dummy, 1); + write (evpipe [1], &(evpipe [1]), 1); } errno = old_errno; |