diff options
author | bors <bors@rust-lang.org> | 2017-07-18 13:33:31 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2017-07-18 13:33:31 +0000 |
commit | 1445dbd40515cc348b528b893caa64d1463592f9 (patch) | |
tree | f4a5f570b9b3a1b0df778100b5555fcd98ee13c2 | |
parent | 73873315c2787b869a827dd43f3ecd728bf51542 (diff) | |
parent | 3e5b0748fe73c72362ce3ae9ec3c840ae78b5124 (diff) | |
download | rust-libc-1445dbd40515cc348b528b893caa64d1463592f9.tar.gz |
Auto merge of #675 - asomers:preadv, r=alexcrichton
Enable preadv and pwritev on the BSDs
-rw-r--r-- | src/unix/bsd/freebsdlike/mod.rs | 8 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/mod.rs | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d8e9ba41a6..44c9e004e6 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -985,6 +985,14 @@ extern { timeout: *const ::timespec) -> ::c_int; pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; + pub fn pwritev(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; + pub fn preadv(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; pub fn sysctlnametomib(name: *const ::c_char, mibp: *mut ::c_int, sizep: *mut ::size_t) diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index e199cf24e5..87756ff6fa 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -580,6 +580,14 @@ extern { pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; + pub fn pwritev(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; + pub fn preadv(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; pub fn fdatasync(fd: ::c_int) -> ::c_int; pub fn openpty(amaster: *mut ::c_int, |