aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys_uds.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2015-08-11 13:20:49 +0200
committerLukas Larsson <[email protected]>2015-12-15 10:05:44 +0100
commitd5f541904839b0307b1db3a28aace3ea6ba2fd37 (patch)
tree310b4a501d7b64235f0ca459a27f024f32b4af50 /erts/emulator/sys/unix/sys_uds.h
parenta8276a38ded70b2854ae0fc2941ba21cc06a9130 (diff)
downloadotp-d5f541904839b0307b1db3a28aace3ea6ba2fd37.tar.gz
otp-d5f541904839b0307b1db3a28aace3ea6ba2fd37.tar.bz2
otp-d5f541904839b0307b1db3a28aace3ea6ba2fd37.zip
erts: Flatten too long io vectors in uds write
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,