Skip to content

Commit

Permalink
Unrolled build for rust-lang#119742
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#119632.
  • Loading branch information
rust-timer authored Jan 14, 2024
2 parents 665d2c6 + 7a7bb3e commit a7a8489
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions library/std/src/os/unix/net/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit a7a8489

Please sign in to comment.