From b877b77f1363c6e8bb8b9cc11c600ecb17a2fcc9 Mon Sep 17 00:00:00 2001 From: Jormundir Date: Tue, 3 Feb 2015 22:01:24 -0800 Subject: std::os::errno returns platform specific value. fixes #21898 --- src/libstd/sys/unix/process.rs | 2 +- src/libstd/sys/unix/timer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index 20f86227e8e..87bf848144d 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -388,7 +388,7 @@ impl Process { match unsafe { c::select(max, &mut set, ptr::null_mut(), ptr::null_mut(), p) } { // interrupted, retry - -1 if os::errno() == libc::EINTR as uint => continue, + -1 if os::errno() == libc::EINTR as i32 => continue, // We read something, break out and process 1 | 2 => {} diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs index 6a4e47f58ce..4cd98f4442b 100644 --- a/src/libstd/sys/unix/timer.rs +++ b/src/libstd/sys/unix/timer.rs @@ -198,7 +198,7 @@ fn helper(input: libc::c_int, messages: Receiver, _: ()) { assert_eq!(fd.read(&mut buf).ok().unwrap(), 1); } - -1 if os::errno() == libc::EINTR as uint => {} + -1 if os::errno() == libc::EINTR as i32 => {} n => panic!("helper thread failed in select() with error: {} ({})", n, os::last_os_error()) } -- cgit 1.4.1-3-g733a5