From f58d50ab66b55f7cf9b258d4de9d6119040792af Mon Sep 17 00:00:00 2001 From: Daniel Carl Jones Date: Wed, 6 Nov 2024 17:24:51 +0000 Subject: [PATCH] Remove use of cfg!() for build.rs due to missing dependencies Signed-off-by: Daniel Carl Jones --- build.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 70af68ec5..c40a5eed4 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,12 @@ fn main() { #[cfg(all(not(feature = "libfuse"), not(target_os = "linux")))] unimplemented!("Building without libfuse is only supported on Linux"); - if cfg!(feature = "libfuse") { + #[cfg(not(feature = "libfuse"))] + { + println!("cargo:rustc-cfg=fuser_mount_impl=\"pure-rust\""); + } + #[cfg(feature = "libfuse")] + { if cfg!(target_os = "macos") { if pkg_config::Config::new() .atleast_version("2.6.0") @@ -42,7 +47,5 @@ fn main() { println!("cargo:rustc-cfg=fuser_mount_impl=\"libfuse2\""); } } - } else { - println!("cargo:rustc-cfg=fuser_mount_impl=\"pure-rust\""); } }