summaryrefslogtreecommitdiff
path: root/src/unix/bsd/mod.rs
diff options
context:
space:
mode:
authorThomas de Zeeuw <thomasdezeeuw@gmail.com>2020-08-28 15:03:50 +0200
committerThomas de Zeeuw <thomasdezeeuw@gmail.com>2020-08-28 15:03:50 +0200
commit41fb480527921c00f42d11896d78e23d5000aad7 (patch)
treefdaf31387e84d8d96dfe29e06a444db4d8e2413a /src/unix/bsd/mod.rs
parenteb079df8827132a7e161d67ac94282bcba62d6f6 (diff)
downloadrust-libc-41fb480527921c00f42d11896d78e23d5000aad7.tar.gz
Add IOV_MAX and UIO_MAXIOV constants
These constant can be used to determine the maximum number of iovecs can be passed to functions like readv/writev. Linux like uses UIO_MAXIOV, while the BSD family uses IOV_MAX.
Diffstat (limited to 'src/unix/bsd/mod.rs')
-rw-r--r--src/unix/bsd/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index 1b55078d5a..9fa6b5dab4 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -254,6 +254,8 @@ pub const FIOGETOWN: ::c_ulong = 0x4004667b;
pub const PATH_MAX: ::c_int = 1024;
+pub const IOV_MAX: ::c_int = 1024;
+
pub const SA_ONSTACK: ::c_int = 0x0001;
pub const SA_SIGINFO: ::c_int = 0x0040;
pub const SA_RESTART: ::c_int = 0x0002;