From 69de3d62a11fd79132b44930b19d971d791d3bb5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 26 Sep 2025 15:52:31 -0600 Subject: [PATCH] Fix build on non-Redox --- Cargo.toml | 4 +++- src/lib.rs | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9b501523a7..f73c7bd1fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,6 @@ fatfs = "0.3.0" fscommon = "0.1.1" gpt = "3.0.0" libc = "0.2.70" -libredox = "0.1" pkgar = "0.1.17" pkgar-core = "0.1.17" pkgar-keys = "0.1.17" @@ -48,6 +47,9 @@ termion = "4" toml = "0.8" uuid = { version = "1.4", features = ["v4"] } +[target.'cfg(target_os = "redox")'.dependencies] +libredox = "0.1" + [patch.crates-io] cc-11 = { git = "https://github.com/tea/cc-rs", branch="riscv-abi-arch-fix", package = "cc" } # https://github.com/briansmith/ring/issues/1999 diff --git a/src/lib.rs b/src/lib.rs index c1a329e364..cfe27a2489 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -684,7 +684,16 @@ where with_redoxfs(disk_redoxfs, disk_option.password_opt, callback) } +#[cfg(not(target_os = "redox"))] +pub fn try_fast_install( + _fs: &mut redoxfs::FileSystem, + _progress: F, +) -> Result { + Ok(false) +} + /// Try fast install using live disk memory +#[cfg(target_os = "redox")] pub fn try_fast_install( fs: &mut redoxfs::FileSystem, mut progress: F,