diff options
author | Joshua M. Clulow <josh@sysmgr.org> | 2021-11-22 00:54:01 -0800 |
---|---|---|
committer | Joshua M. Clulow <josh@sysmgr.org> | 2022-02-10 15:54:24 -0800 |
commit | 4249c680284186e870a347770725733a2407e76a (patch) | |
tree | 7bda8830728ba859cb6f9ad09d54fba094d4e860 | |
parent | c14a884c574d0f94b01b3379e4f20e58c547560b (diff) | |
download | rust-libc-4249c680284186e870a347770725733a2407e76a.tar.gz |
illumos: sendfile(3EXT) is in libsendfile, not libc
As per https://illumos.org/man/3EXT/sendfile a separate header and
library are required to access sendfile() and sendfilev() on illumos
systems.
-rw-r--r-- | libc-test/build.rs | 1 | ||||
-rw-r--r-- | src/unix/solarish/mod.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index ba5197e36f..7c062624b9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -781,6 +781,7 @@ fn test_solarish(target: &str) { "sys/priv.h", "sys/pset.h", "sys/resource.h", + "sys/sendfile.h", "sys/socket.h", "sys/stat.h", "sys/statvfs.h", diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 2b2e120e7e..d0c255cbb3 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -2817,7 +2817,10 @@ extern "C" { pub fn getpflags(flags: ::c_uint) -> ::c_uint; pub fn setpflags(flags: ::c_uint, value: ::c_uint) -> ::c_int; +} +#[link(name = "sendfile")] +extern "C" { pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t) -> ::ssize_t; pub fn sendfilev( |