summaryrefslogtreecommitdiffstats
path: root/library/std/src/sys/solid/net.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/solid/net.rs')
-rw-r--r--library/std/src/sys/solid/net.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/sys/solid/net.rs b/library/std/src/sys/solid/net.rs
index 0bd2bc3b9..6adced787 100644
--- a/library/std/src/sys/solid/net.rs
+++ b/library/std/src/sys/solid/net.rs
@@ -181,6 +181,11 @@ pub(super) fn error_name(er: abi::ER) -> Option<&'static str> {
unsafe { CStr::from_ptr(netc::strerror(er)) }.to_str().ok()
}
+#[inline]
+pub fn is_interrupted(er: abi::ER) -> bool {
+ er == netc::SOLID_NET_ERR_BASE - libc::EINTR
+}
+
pub(super) fn decode_error_kind(er: abi::ER) -> ErrorKind {
let errno = netc::SOLID_NET_ERR_BASE - er;
match errno as libc::c_int {