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 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
This commit is contained in:
Matthias Krüger 2023-09-02 07:48:22 +02:00 committed by GitHub
commit b44bf0d117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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 {