cygwin competibility fix (#64)

This commit is contained in:
karel-m 2019-03-20 16:05:37 +01:00 committed by Matt Johnston
parent 493ab8fd81
commit 16fb0b0d53

View File

@ -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);