Skip to content

Commit

Permalink
Backlog for HorizonOS UnixListener
Browse files Browse the repository at this point in the history
  • Loading branch information
Meziu committed Jan 9, 2024
1 parent be00c5a commit 7a7bb3e
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 7a7bb3e

Please sign in to comment.