diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-01-14 20:17:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-14 20:17:23 +0100 |
| commit | e401754717f314e698c8aed5fb60e96542edb086 (patch) | |
| tree | 3dfa75e0b47367fa5136172953df88bfec75e550 | |
| parent | 8914ca722c29f533335ec4167a8a30658ae8d914 (diff) | |
| parent | 7a7bb3ef85ca2f827c39db9fd1594db5162cea13 (diff) | |
| download | rust-e401754717f314e698c8aed5fb60e96542edb086.tar.gz rust-e401754717f314e698c8aed5fb60e96542edb086.zip | |
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.
| -rw-r--r-- | library/std/src/os/unix/net/listener.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/library/std/src/os/unix/net/listener.rs b/library/std/src/os/unix/net/listener.rs index f6835472e2c..8bf1e2dca6f 100644 --- a/library/std/src/os/unix/net/listener.rs +++ b/library/std/src/os/unix/net/listener.rs @@ -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; |
