Fix fcntl for FreeBSD

Need to use the right cfg option for the conditional compilation.
target_os is the right option to use when targeting FreeBSD. target_env
was used before which seems to be a typo.
This commit is contained in:
Alexander Thaller 2021-01-03 00:39:12 +01:00
parent 8cff207a13
commit d965259685
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ use crate::sys::uio::IoVec; // For vmsplice
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_env = "uclibc",
target_env = "freebsd"
target_os = "freebsd"
))]
pub use self::posix_fadvise::*;
@ -587,7 +587,7 @@ pub fn fallocate(
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_env = "uclibc",
target_env = "freebsd"
target_os = "freebsd"
))]
mod posix_fadvise {
use crate::errno::Errno;

View File

@ -332,7 +332,7 @@ mod linux_android {
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_env = "uclibc",
target_env = "freebsd"))]
target_os = "freebsd"))]
mod test_posix_fadvise {
use tempfile::NamedTempFile;