diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-02 07:48:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-02 07:48:22 +0200 |
| commit | b44bf0d117717c4d051e632771006911ed650b44 (patch) | |
| tree | de35e4336fad5f039f37bc1c905a6996b4d6a9cf /library/std/src/sys | |
| parent | 1df0c21af1db9b44de8b8866132534a7fd976b4a (diff) | |
| parent | eb627ea3392c37cd94e7696dca683ef596c8b66c (diff) | |
Rollup merge of #115427 - solid-rs:patch/kmc-solid/is-interrupted, r=cuviper
kmc-solid: Fix `is_interrupted`
Follow-up to #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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/solid/error.rs | 5 | ||||
| -rw-r--r-- | library/std/src/sys/solid/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/solid/net.rs | 3 |
3 files changed, 2 insertions, 8 deletions
diff --git a/library/std/src/sys/solid/error.rs b/library/std/src/sys/solid/error.rs index d1877a8bcd2..547b4f3a984 100644 --- a/library/std/src/sys/solid/error.rs +++ b/library/std/src/sys/solid/error.rs @@ -31,11 +31,6 @@ pub fn error_name(er: abi::ER) -> Option<&'static str> { } } -#[inline] -fn is_interrupted(er: abi::ER) -> bool { - false -} - pub fn decode_error_kind(er: abi::ER) -> ErrorKind { match er { // Success diff --git a/library/std/src/sys/solid/mod.rs b/library/std/src/sys/solid/mod.rs index e7029174511..5af83653cf8 100644 --- a/library/std/src/sys/solid/mod.rs +++ b/library/std/src/sys/solid/mod.rs @@ -74,7 +74,7 @@ pub fn unsupported_err() -> crate::io::Error { #[inline] pub fn is_interrupted(code: i32) -> bool { - error::is_interrupted(code) + net::is_interrupted(code) } pub fn decode_error_kind(code: i32) -> crate::io::ErrorKind { diff --git a/library/std/src/sys/solid/net.rs b/library/std/src/sys/solid/net.rs index bdd64ab02b7..6adced787f3 100644 --- a/library/std/src/sys/solid/net.rs +++ b/library/std/src/sys/solid/net.rs @@ -183,8 +183,7 @@ pub(super) fn error_name(er: abi::ER) -> Option<&'static str> { #[inline] pub fn is_interrupted(er: abi::ER) -> bool { - let errno = netc::SOLID_NET_ERR_BASE - er; - errno as libc::c_int == libc::EINTR + er == netc::SOLID_NET_ERR_BASE - libc::EINTR } pub(super) fn decode_error_kind(er: abi::ER) -> ErrorKind { |
