Skip to content

Commit

Permalink
Merge pull request #2581 from bakaq/fix_hostname_feature
Browse files Browse the repository at this point in the history
Fix not compiling without hostname feature
  • Loading branch information
mthom authored Sep 30, 2024
2 parents 0552530 + 3bc1885 commit 2f47343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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!()
}
Expand Down

0 comments on commit 2f47343

Please sign in to comment.