Skip to content

Commit

Permalink
Update src/sys/unix/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas de Zeeuw <[email protected]>
  • Loading branch information
stlankes and Thomasdezeeuw authored May 27, 2024
1 parent f5d912e commit a8a5c5b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
macro_rules! syscall {
($fn: ident ( $($arg: expr),* $(,)* ) ) => {{
let res = unsafe { libc::$fn($($arg, )*) };
#[cfg(target_os = "hermit")]
if res < 0 {
Err(std::io::Error::last_os_error())
} else {
Ok(res)
}
#[cfg(unix)]
if res == -1 {
Err(std::io::Error::last_os_error())
} else {
Expand Down

0 comments on commit a8a5c5b

Please sign in to comment.