From 3bc18856066ca7c05e4eb781d7c2eeea34856e81 Mon Sep 17 00:00:00 2001 From: bakaq Date: Sun, 29 Sep 2024 16:50:06 -0300 Subject: [PATCH] Fix not compiling without hostname feature --- src/machine/system_calls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index a092633ec..89ce22727 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -1772,7 +1772,7 @@ impl Machine { self.machine_st.fail = true; } - #[cfg(not(target_arch = "wasm32"))] + #[cfg(all(not(target_arch = "wasm32"), feature = "hostname"))] #[inline(always)] pub(crate) fn current_hostname(&mut self) { if let Ok(host) = hostname::get() { @@ -1789,7 +1789,7 @@ impl Machine { self.machine_st.fail = true; } - #[cfg(target_arch = "wasm32")] + #[cfg(any(target_arch = "wasm32", not(feature = "hostname")))] pub(crate) fn current_hostname(&mut self) { unimplemented!() }