Skip to content

Commit

Permalink
Rollup merge of rust-lang#115816 - vita-rust:vita, r=cuviper
Browse files Browse the repository at this point in the history
Disabled socketpair for Vita

There is no `socketpair` syscall in Vita newlib. This is reflected in a rust-lang/libc#3284, in which this method is removed for vita target.

Also, we would need the fixes from the abovementioned PR for sockets in std (previously we had some incorrect constant values),  but that can be done separately when rust-lang/libc#3284 is reviewed, merged, and released.
  • Loading branch information
matthiaskrgr authored Sep 13, 2023
2 parents 48d89a8 + 41ee874 commit 156f50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/sys/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Socket {
}
}

#[cfg(not(target_os = "vxworks"))]
#[cfg(not(any(target_os = "vxworks", target_os = "vita")))]
pub fn new_pair(fam: c_int, ty: c_int) -> io::Result<(Socket, Socket)> {
unsafe {
let mut fds = [0, 0];
Expand Down Expand Up @@ -133,7 +133,7 @@ impl Socket {
}
}

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

0 comments on commit 156f50b

Please sign in to comment.