Skip to content

Commit bf89444

Browse files
jclulowpfmooney
authored andcommitted
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.
1 parent b4e8e5d commit bf89444

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ fn test_solarish(target: &str) {
780780
"sys/priv.h",
781781
"sys/pset.h",
782782
"sys/resource.h",
783+
"sys/sendfile.h",
783784
"sys/socket.h",
784785
"sys/stat.h",
785786
"sys/statvfs.h",

src/unix/solarish/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,7 +2809,10 @@ extern "C" {
28092809

28102810
pub fn getpflags(flags: ::c_uint) -> ::c_uint;
28112811
pub fn setpflags(flags: ::c_uint, value: ::c_uint) -> ::c_int;
2812+
}
28122813

2814+
#[link(name = "sendfile")]
2815+
extern "C" {
28132816
pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t)
28142817
-> ::ssize_t;
28152818
pub fn sendfilev(

0 commit comments

Comments
 (0)