Skip to content

Commit a001869

Browse files
authored
sys::sendfile enable it on solaris based systems (#2198)
* sys::sendfile enable it on solaris based systems * changelog entry
1 parent a96a31e commit a001869

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

changelog/2198.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `sys::sendfile` support for solaris/illumos.

src/sys/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ feature! {
124124
target_os = "freebsd",
125125
apple_targets,
126126
target_os = "linux",
127+
target_os = "solaris",
128+
target_os = "illumos",
127129
))]
128130
feature! {
129131
#![feature = "zerocopy"]

src/sys/sendfile.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ use crate::Result;
2020
///
2121
/// `in_fd` must support `mmap`-like operations and therefore cannot be a socket.
2222
///
23-
/// For more information, see [the sendfile(2) man page.](https://man7.org/linux/man-pages/man2/sendfile.2.html)
24-
#[cfg(any(target_os = "android", target_os = "linux"))]
23+
/// For more information, see [the sendfile(2) man page.](https://man7.org/linux/man-pages/man2/sendfile.2.html) for Linux,
24+
/// see [the sendfile(2) man page.](https://docs.oracle.com/cd/E88353_01/html/E37843/sendfile-3c.html) for Solaris.
25+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "solaris", target_os = "illumos"))]
2526
pub fn sendfile<F1: AsFd, F2: AsFd>(
2627
out_fd: F1,
2728
in_fd: F2,

0 commit comments

Comments
 (0)