summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkarel-m <1918753+karel-m@users.noreply.github.com>2019-03-20 16:05:37 +0100
committerMatt Johnston <matt@ucc.asn.au>2019-03-20 23:05:37 +0800
commit16fb0b0d5369ccf0557d224c70a87e4a65f59a80 (patch)
tree5e4ea14175a5247f8330b9c076550e7d50ec037c
parent493ab8fd813b71903d51ea81f903770c6c3efa7d (diff)
cygwin competibility fix (#64)
-rw-r--r--netio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/netio.c b/netio.c
index 87e7fb4..8452003 100644
--- a/netio.c
+++ b/netio.c
@@ -294,7 +294,11 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
buffer *writebuf;
#ifndef IOV_MAX
- #define IOV_MAX UIO_MAXIOV
+ #if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
+ #define IOV_MAX 1024
+ #else
+ #define IOV_MAX UIO_MAXIOV
+ #endif
#endif
*iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count);