Set IOV_MAX for IRIX

This commit is contained in:
Kazuo Kuroi 2020-06-10 22:09:29 +08:00
parent ad1e9b7e3c
commit ec993dbdbc

10
netio.c
View File

@ -293,13 +293,15 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
int len; int len;
buffer *writebuf; buffer *writebuf;
#ifndef IOV_MAX #ifndef IOV_MAX
#if defined(__CYGWIN__) && !defined(UIO_MAXIOV) #if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
#define IOV_MAX 1024 #define IOV_MAX 1024
#else #elif defined(__sgi)
#define IOV_MAX 512
#else
#define IOV_MAX UIO_MAXIOV #define IOV_MAX UIO_MAXIOV
#endif
#endif #endif
#endif
*iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count); *iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count);