From acdf83f2288e1b80259dafeca4a0cee9a42973c3 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 6 Dec 2017 09:25:29 +0100 Subject: Update miri to rustc changes --- src/libstd/sys/unix/stdio.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libstd/sys/unix/stdio.rs') diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs index 7a8fe25d98e..e9b3d4affc7 100644 --- a/src/libstd/sys/unix/stdio.rs +++ b/src/libstd/sys/unix/stdio.rs @@ -70,5 +70,8 @@ impl io::Write for Stderr { } } -pub const EBADF_ERR: i32 = ::libc::EBADF as i32; +pub fn is_ebadf(err: &io::Error) -> bool { + err.raw_os_error() == Some(libc::EBADF as i32) +} + pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE; -- cgit 1.4.1-3-g733a5