diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index 0495dbc692c..eef16247710 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -445,7 +445,7 @@ pub fn stdout_writer() -> Box { impl std::io::Write for ClosedStdout { fn write(&mut self, _buf: &[u8]) -> std::io::Result { - Err(Errno::EBADF.into()) + Err(std::io::Error::from_raw_os_error(libc::EBADF)) } // With no output, a closed stdout is not an error.