Skip to content

Commit c64438b

Browse files
committed
Updated libc and doc for Vita target
1 parent c44f85a commit c64438b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

std/src/os/fd/owned.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ impl BorrowedFd<'_> {
9797
// We want to atomically duplicate this file descriptor and set the
9898
// CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This
9999
// is a POSIX flag that was added to Linux in 2.6.24.
100-
#[cfg(not(target_os = "espidf"))]
100+
#[cfg(not(any(target_os = "espidf", target_os = "vita")))]
101101
let cmd = libc::F_DUPFD_CLOEXEC;
102102

103103
// For ESP-IDF, F_DUPFD is used instead, because the CLOEXEC semantics
104104
// will never be supported, as this is a bare metal framework with
105105
// no capabilities for multi-process execution. While F_DUPFD is also
106106
// not supported yet, it might be (currently it returns ENOSYS).
107-
#[cfg(target_os = "espidf")]
107+
#[cfg(any(target_os = "espidf", target_os = "vita"))]
108108
let cmd = libc::F_DUPFD;
109109

110110
// Avoid using file descriptors below 3 as they are used for stdio
@@ -119,7 +119,7 @@ impl BorrowedFd<'_> {
119119
pub fn try_clone_to_owned(&self) -> crate::io::Result<OwnedFd> {
120120
Err(crate::io::const_io_error!(
121121
crate::io::ErrorKind::Unsupported,
122-
"operation not supported on WASI yet",
122+
"operation not supported on this platform",
123123
))
124124
}
125125
}

std/src/sys/unix/net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl Socket {
103103
}
104104
}
105105

106-
#[cfg(not(any(target_os = "vxworks", target_os = "vita")))]
106+
#[cfg(not(target_os = "vxworks"))]
107107
pub fn new_pair(fam: c_int, ty: c_int) -> io::Result<(Socket, Socket)> {
108108
unsafe {
109109
let mut fds = [0, 0];
@@ -135,7 +135,7 @@ impl Socket {
135135
}
136136
}
137137

138-
#[cfg(any(target_os = "vxworks", target_os = "vita"))]
138+
#[cfg(target_os = "vxworks")]
139139
pub fn new_pair(_fam: c_int, _ty: c_int) -> io::Result<(Socket, Socket)> {
140140
unimplemented!()
141141
}

0 commit comments

Comments
 (0)