summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thom <markjordanthom@gmail.com>2024-09-29 21:09:22 -0600
committerGitHub <noreply@github.com>2024-09-29 21:09:22 -0600
commit2f47343cb5feb09d4950dcc05dd29ff2b1a2443d (patch)
tree803953c81a0bb63afaf1e8457b80ae9c1429451f
parent0552530b4180efa6fe069cd8fac687d689a1cb0f (diff)
parent3bc18856066ca7c05e4eb781d7c2eeea34856e81 (diff)
Merge pull request #2581 from bakaq/fix_hostname_featureHEADmaster
Fix not compiling without hostname feature
-rw-r--r--src/machine/system_calls.rs4
1 files changed, 2 insertions, 2 deletions
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!()
}