Skip to content

Commit 84fbc43

Browse files
committed
add cfg on fspy_test_bin
1 parent 09d0b2a commit 84fbc43

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

crates/fspy_test_bin/src/main.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
use std::fs::File;
2-
3-
use nix::fcntl::{AT_FDCWD, OFlag, OpenHow, openat2};
1+
#[cfg(not(target_os = "linux"))]
2+
fn main() {
3+
unimplemented!("fspy_test_bin is only for Linux");
4+
}
45

6+
#[cfg(target_os = "linux")]
57
fn main() {
8+
use std::fs::File;
9+
10+
use nix::fcntl::{AT_FDCWD, OFlag, OpenHow, openat2};
611
let args = std::env::args().collect::<Vec<_>>();
712
assert!(args.len() == 3, "expected 2 arguments: <action> <file_path>");
813
let action = args[1].as_str();

0 commit comments

Comments
 (0)