aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys_uds.h
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/sys/unix/sys_uds.h')
-rw-r--r--erts/emulator/sys/unix/sys_uds.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/sys_uds.h b/erts/emulator/sys/unix/sys_uds.h
index 7ff58b17dd..844a2804d8 100644
--- a/erts/emulator/sys/unix/sys_uds.h
+++ b/erts/emulator/sys/unix/sys_uds.h
@@ -29,10 +29,20 @@
#define _XOPEN_SOURCE 500
#endif
+#include <limits.h>
+
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
+#if defined IOV_MAX
+#define MAXIOV IOV_MAX
+#elif defined UIO_MAXIOV
+#define MAXIOV UIO_MAXIOV
+#else
+#define MAXIOV 16
+#endif
+
#include "sys.h"
int sys_uds_readv(int fd, struct iovec *iov, size_t iov_len,