From ee748385e616c19536f63e4f3c1e54a32083d1b1 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 27 Sep 2023 23:58:53 +0200 Subject: [PATCH] Fix ID mapping test on macOS --- tests/consistent_id_mappings.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/consistent_id_mappings.rs b/tests/consistent_id_mappings.rs index ee45fd6..b69c862 100644 --- a/tests/consistent_id_mappings.rs +++ b/tests/consistent_id_mappings.rs @@ -1,5 +1,7 @@ +#[cfg(target_os = "linux")] use birdcage::{Birdcage, Sandbox}; +#[cfg(target_os = "linux")] fn main() { let uid = unsafe { libc::getuid() }; let gid = unsafe { libc::getgid() }; @@ -14,3 +16,6 @@ fn main() { assert_eq!(euid, unsafe { libc::geteuid() }); assert_eq!(egid, unsafe { libc::getegid() }); } + +#[cfg(not(target_os = "linux"))] +fn main() {}