Skip to content

Commit 535996f

Browse files
committed
fixup! std: add platform support for hexagon-unknown-qurt
Fix unsupported import for non-unix targets (e.g. wasm32-wasip1). On qurt, `crate::sys::unsupported` is a module (from pal::unix), but on other platforms using the unsupported process/net modules (e.g. wasm), it's a function re-exported from pal. Use conditional imports to handle both cases.
1 parent de8ba26 commit 535996f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

library/std/src/sys/net/connection/unsupported.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use crate::fmt;
22
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut};
33
use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr, ToSocketAddrs};
4+
#[cfg(not(target_os = "qurt"))]
5+
use crate::sys::unsupported;
6+
#[cfg(target_os = "qurt")]
47
use crate::sys::unsupported::unsupported;
58
use crate::time::Duration;
69

library/std/src/sys/process/unsupported.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ use crate::num::NonZero;
55
use crate::path::Path;
66
use crate::process::StdioPipes;
77
use crate::sys::fs::File;
8+
#[cfg(not(target_os = "qurt"))]
9+
use crate::sys::unsupported;
10+
#[cfg(target_os = "qurt")]
811
use crate::sys::unsupported::unsupported;
912
use crate::{fmt, io};
1013

0 commit comments

Comments
 (0)