diff options
Diffstat (limited to 'src/ivyfifo.c')
-rw-r--r-- | src/ivyfifo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ivyfifo.c b/src/ivyfifo.c index 9bee644..e427f1d 100644 --- a/src/ivyfifo.c +++ b/src/ivyfifo.c @@ -1,7 +1,11 @@ #include <stdlib.h> #include <string.h> #include <sys/types.h> +#ifdef WIN32 +#include <windows.h> +#else #include <sys/socket.h> +#endif #include <stdio.h> // DEBUG, pour printf #include "ivyfifo.h" #include "param.h" @@ -146,7 +150,11 @@ unsigned int IvyFifoSendSocket (IvyFifoBuffer *f, const int fd) do { maxLen = MIN ((f->end - f->rptr), IvyFifoLength(f)); - realLen = send (fd, f->rptr, maxLen, MSG_DONTWAIT); +#ifdef WIN32 + realLen = send (fd, f->rptr, maxLen, 0); +#else + realLen = send (fd, f->rptr, maxLen, MSG_DONTWAIT); +#endif IvyFifoDrain(f, realLen); // printf ("DBG> maxLen=%d realLen=%d IvyFifoLength=%d\n", // maxLen, realLen, IvyFifoLength(f)); |