This fixes a warning.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
let r = libc::waitpid(child.as_raw(), &mut wstatus, 0);
if r == -1 { crashe("await child startup status",
- nix::errno::from_i32(errno())) }
+ compat::nix_last_errno()) }
if r != child.as_raw() { crashm("await child startup status: wrong pid") }
let cooked = WaitStatus::from_raw(child, wstatus)
}};
Ok((map(a), map(b)))
}
+
+#[allow(deprecated)]
+pub fn nix_last_errno() -> nix::errno::Errno {
+ use nix::errno::*;
+ from_i32(errno())
+}