Skip to content

Commit

Permalink
Fix fcntl for FreeBSD
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Alexander Thaller committed Jan 2, 2021
1 parent 8cff207 commit d965259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/test_fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d965259

Please sign in to comment.