mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #119742 - Meziu:armv6k-nintendo-3ds, r=Mark-Simulacrum
ARMv6K HorizonOS - Fix backlog for UnixListener Simple `#[cfg]` fix to avoid using `libc::SOMAXCONN`, which isn't defined for the `armv6k-nintendo-3ds` target. Edit: This is similar to #119632.
This commit is contained in:
commit
e401754717
@ -73,7 +73,12 @@ impl UnixListener {
|
||||
unsafe {
|
||||
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
|
||||
let (addr, len) = sockaddr_un(path.as_ref())?;
|
||||
#[cfg(any(target_os = "windows", target_os = "redox", target_os = "espidf"))]
|
||||
#[cfg(any(
|
||||
target_os = "windows",
|
||||
target_os = "redox",
|
||||
target_os = "espidf",
|
||||
target_os = "horizon"
|
||||
))]
|
||||
const backlog: libc::c_int = 128;
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
const backlog: libc::c_int = -1;
|
||||
@ -83,7 +88,8 @@ impl UnixListener {
|
||||
target_os = "linux",
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "espidf"
|
||||
target_os = "espidf",
|
||||
target_os = "horizon"
|
||||
)))]
|
||||
const backlog: libc::c_int = libc::SOMAXCONN;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user