Skip to content

Commit b9980f3

Browse files
authored
Rollup merge of rust-lang#115427 - solid-rs:patch/kmc-solid/is-interrupted, r=cuviper
kmc-solid: Fix `is_interrupted` Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. ``` error[E0603]: function `is_interrupted` is private --> library\std\src\sys\solid\mod.rs:77:12 | 77 | error::is_interrupted(code) | ^^^^^^^^^^^^^^ private function | note: the function `is_interrupted` is defined here --> library\std\src\sys\solid\error.rs:35:1 | 35 | fn is_interrupted(er: abi::ER) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
2 parents e808280 + eb627ea commit b9980f3

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

library/std/src/sys/solid/error.rs

-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ pub fn error_name(er: abi::ER) -> Option<&'static str> {
3131
}
3232
}
3333

34-
#[inline]
35-
fn is_interrupted(er: abi::ER) -> bool {
36-
false
37-
}
38-
3934
pub fn decode_error_kind(er: abi::ER) -> ErrorKind {
4035
match er {
4136
// Success

library/std/src/sys/solid/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn unsupported_err() -> crate::io::Error {
7474

7575
#[inline]
7676
pub fn is_interrupted(code: i32) -> bool {
77-
error::is_interrupted(code)
77+
net::is_interrupted(code)
7878
}
7979

8080
pub fn decode_error_kind(code: i32) -> crate::io::ErrorKind {

library/std/src/sys/solid/net.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ pub(super) fn error_name(er: abi::ER) -> Option<&'static str> {
183183

184184
#[inline]
185185
pub fn is_interrupted(er: abi::ER) -> bool {
186-
let errno = netc::SOLID_NET_ERR_BASE - er;
187-
errno as libc::c_int == libc::EINTR
186+
er == netc::SOLID_NET_ERR_BASE - libc::EINTR
188187
}
189188

190189
pub(super) fn decode_error_kind(er: abi::ER) -> ErrorKind {

0 commit comments

Comments
 (0)