diff options
| author | bors <bors@rust-lang.org> | 2023-10-17 10:22:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-17 10:22:14 +0000 |
| commit | 2e57d647b039ec993f4fdf03571c9039092d74e2 (patch) | |
| tree | 0461afe481db0bcd730ef0c4f017486d7cc06f62 /library/std | |
| parent | 347452e7e378d93e7ba29af05f022a5445e1f459 (diff) | |
| parent | ba13e37e3088b5c1114a4b258b55d9020c3f4c70 (diff) | |
| download | rust-2e57d647b039ec993f4fdf03571c9039092d74e2.tar.gz rust-2e57d647b039ec993f4fdf03571c9039092d74e2.zip | |
Auto merge of #116518 - vita-rust:vita, r=workingjubilee
Updated libc and doc for Vita target Doc changes: - Updated Vita target readme. The recommended approach to build artifacts for the platform now is [cargo-vita](https://crates.io/crates/cargo-vita) which wraps all the convoluted steps previously described in a yaml for `cargo-make` - Updated maintainer list for Vita target. (`@ZetaNumbers` `@pheki` please agree to be added to the list, `@amg98` please let us know if you're still planning on actively maintaining target support) Code changes: - ~Updated libc for rust-lang/libc#3284 and rust-lang/libc#3366~ (Already merged in #116527) - In dupfd changed the flag same as for esp target, there is no CLOEXEC on Vita - Enabled `new_pair` since we've implemented `socketpair` in Vita newlib
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/os/fd/owned.rs | 6 | ||||
| -rw-r--r-- | library/std/src/sys/unix/net.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs index 81106d6c62c..24f2bdcf421 100644 --- a/library/std/src/os/fd/owned.rs +++ b/library/std/src/os/fd/owned.rs @@ -97,14 +97,14 @@ impl BorrowedFd<'_> { // We want to atomically duplicate this file descriptor and set the // CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This // is a POSIX flag that was added to Linux in 2.6.24. - #[cfg(not(target_os = "espidf"))] + #[cfg(not(any(target_os = "espidf", target_os = "vita")))] let cmd = libc::F_DUPFD_CLOEXEC; // For ESP-IDF, F_DUPFD is used instead, because the CLOEXEC semantics // will never be supported, as this is a bare metal framework with // no capabilities for multi-process execution. While F_DUPFD is also // not supported yet, it might be (currently it returns ENOSYS). - #[cfg(target_os = "espidf")] + #[cfg(any(target_os = "espidf", target_os = "vita"))] let cmd = libc::F_DUPFD; // Avoid using file descriptors below 3 as they are used for stdio @@ -119,7 +119,7 @@ impl BorrowedFd<'_> { pub fn try_clone_to_owned(&self) -> crate::io::Result<OwnedFd> { Err(crate::io::const_io_error!( crate::io::ErrorKind::Unsupported, - "operation not supported on WASI yet", + "operation not supported on this platform", )) } } diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/unix/net.rs index f450d708dae..7e2016c410e 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/unix/net.rs @@ -103,7 +103,7 @@ impl Socket { } } - #[cfg(not(any(target_os = "vxworks", target_os = "vita")))] + #[cfg(not(target_os = "vxworks"))] pub fn new_pair(fam: c_int, ty: c_int) -> io::Result<(Socket, Socket)> { unsafe { let mut fds = [0, 0]; @@ -135,7 +135,7 @@ impl Socket { } } - #[cfg(any(target_os = "vxworks", target_os = "vita"))] + #[cfg(target_os = "vxworks")] pub fn new_pair(_fam: c_int, _ty: c_int) -> io::Result<(Socket, Socket)> { unimplemented!() } |
