diff --git a/Cargo.toml b/Cargo.toml index 68f26c9..98c4dde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ futures = "0.3" grass = { version = "0.13", features = ["macro"], default-features = false } hex = "0.4" httparse = "1" -if-addrs = "0.15" libflate = "2" log = "0.4" maud = "0.27" @@ -62,6 +61,9 @@ thiserror = "2" tokio = { version = "1.47.1", features = ["fs", "macros"] } zip = { version = "8", default-features = false } +[target.'cfg(not(target_os = "redox"))'.dependencies] +if-addrs = "0.15" + [features] default = ["tls"] # This feature allows us to use rustls only on architectures supported by ring. diff --git a/src/main.rs b/src/main.rs index aea9ed9..3c91968 100644 --- a/src/main.rs +++ b/src/main.rs @@ -193,6 +193,7 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), StartupError> { .partition(|addr| !addr.is_unspecified()); // Replace wildcard addresses with local interface addresses + #[cfg(not(target_os="redox"))] if !wildcard.is_empty() { let all_ipv4 = wildcard.iter().any(|addr| addr.is_ipv4()); let all_ipv6 = wildcard.iter().any(|addr| addr.is_ipv6());