From: bakaq Date: Sun, 29 Sep 2024 19:50:06 +0000 (-0300) Subject: Fix not compiling without hostname feature X-Git-Tag: v0.10.0~110^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=3bc18856066ca7c05e4eb781d7c2eeea34856e81;p=scryer-prolog.git Fix not compiling without hostname feature --- diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index a092633e..89ce2272 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!() }