diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-05-29 03:54:44 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-05-29 03:54:44 +0000 |
commit | badb45113ba98d46a28b54c5f9a9ff122774976c (patch) | |
tree | 1e92ceebfae83013c3bb216041315d87470f5539 /src/sys/mod.rs | |
parent | b87d45b349485cf2ecf7414af70133bd8e91c4ab (diff) | |
parent | 325c43c6d5b5b8945dd8bee3575500887923b2cf (diff) | |
download | nix-badb45113ba98d46a28b54c5f9a9ff122774976c.zip |
Merge #901
901: Implement sendfile on FreeBSD and Darwin r=Susurrus a=morrowa
This PR exposes the `sendfile` system call on libc's supported BSD-likes:
* FreeBSD
* Darwin (macOS/iOS)
DragonFly could be supported in the future, but I was unable to build rustc to test.
Note that NetBSD has no equivalent system call.
Co-authored-by: Andrew Morrow <andrew.d.morrow@gmail.com>
Diffstat (limited to 'src/sys/mod.rs')
-rw-r--r-- | src/sys/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index db03dece..e75e9d88 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -49,8 +49,11 @@ pub mod reboot; pub mod select; -// TODO: Add support for dragonfly, freebsd, and ios/macos. -#[cfg(any(target_os = "android", target_os = "linux"))] +#[cfg(any(target_os = "android", + target_os = "freebsd", + target_os = "ios", + target_os = "linux", + target_os = "macos"))] pub mod sendfile; pub mod signal; |