diff options
author | Lukas Larsson <[email protected]> | 2015-08-11 13:20:49 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2015-12-15 10:05:44 +0100 |
commit | d5f541904839b0307b1db3a28aace3ea6ba2fd37 (patch) | |
tree | 310b4a501d7b64235f0ca459a27f024f32b4af50 /erts/emulator/sys/unix/sys_uds.h | |
parent | a8276a38ded70b2854ae0fc2941ba21cc06a9130 (diff) | |
download | otp-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.h | 10 |
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, |