diff --git a/Cargo.toml b/Cargo.toml index 7276abb1..ceee26a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ nix = { version = "0.29", features = ["fs", "ioctl", "term"] } num-traits = "0.2" parking_lot = "0.12" regex = "1.10" -reqwest = { version = "0.12", features = ["json"] } +reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "charset", "http2"] } rustix = { version = "0.38", features = ["fs", "termios"] } slotmap = "1.0" udev = "0.9" diff --git a/mujina-miner/Cargo.toml b/mujina-miner/Cargo.toml index 1cb651a9..ebd43c65 100644 --- a/mujina-miner/Cargo.toml +++ b/mujina-miner/Cargo.toml @@ -49,7 +49,7 @@ ruint = "1.17.0" core-foundation = { workspace = true } io-kit-sys = { workspace = true } -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies] tracing-journald = { workspace = true } udev = { workspace = true } diff --git a/mujina-miner/src/tracing.rs b/mujina-miner/src/tracing.rs index 42333f0e..271beaac 100644 --- a/mujina-miner/src/tracing.rs +++ b/mujina-miner/src/tracing.rs @@ -53,7 +53,7 @@ fn build_env_filter() -> EnvFilter { filter_str.parse().unwrap() } -#[cfg(target_os = "linux")] +#[cfg(all(target_os = "linux", target_env = "gnu"))] mod journald { use std::env; use std::io; @@ -127,7 +127,7 @@ mod journald { } } -#[cfg(not(target_os = "linux"))] +#[cfg(not(all(target_os = "linux", target_env = "gnu")))] mod journald { pub fn try_init() -> bool { false diff --git a/mujina-miner/src/transport/usb.rs b/mujina-miner/src/transport/usb.rs index 6b4cf076..d7e7cf9f 100644 --- a/mujina-miner/src/transport/usb.rs +++ b/mujina-miner/src/transport/usb.rs @@ -25,9 +25,9 @@ use super::TransportEvent as OuterTransportEvent; // Platform-specific serial port discovery, aliased to a common name // so call sites are platform-independent. -#[cfg(target_os = "linux")] +#[cfg(all(target_os = "linux", target_env = "gnu"))] mod linux; -#[cfg(target_os = "linux")] +#[cfg(all(target_os = "linux", target_env = "gnu"))] use linux as platform; #[cfg(target_os = "macos")] @@ -39,7 +39,7 @@ use macos as platform; // miner still compiles (e.g., for CPU mining). If this is ever // called, something has gone wrong because a board matched a USB // device on a platform where we can't find its serial ports. -#[cfg(not(any(target_os = "linux", target_os = "macos")))] +#[cfg(not(any(all(target_os = "linux", target_env = "gnu"), target_os = "macos")))] mod platform { use anyhow::{Result, bail}; use nusb::DeviceInfo;