From 45cf6cc9e55673f82f915b552810f146d34af484 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 26 Sep 2023 23:26:53 +0200 Subject: [PATCH] Fix test failures on macOS --- tests/fs_without_landlock.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/fs_without_landlock.rs b/tests/fs_without_landlock.rs index 6207e5b..391b81c 100644 --- a/tests/fs_without_landlock.rs +++ b/tests/fs_without_landlock.rs @@ -17,6 +17,7 @@ const ARCH: TargetArch = TargetArch::x86_64; #[cfg(target_arch = "aarch64")] const ARCH: TargetArch = TargetArch::aarch64; +#[cfg(target_os = "linux")] fn main() { const FILE_CONTENT: &str = "expected content"; @@ -52,3 +53,6 @@ fn main() { let result = fs::read_to_string(private_path); assert!(result.is_err()); } + +#[cfg(not(target_os = "linux"))] +fn main() {}