diff --git a/library/std/src/os/unix/net/listener.rs b/library/std/src/os/unix/net/listener.rs index 7e53acbc387..a55199c82fc 100644 --- a/library/std/src/os/unix/net/listener.rs +++ b/library/std/src/os/unix/net/listener.rs @@ -81,21 +81,25 @@ impl UnixListener { ))] const backlog: core::ffi::c_int = 128; #[cfg(any( + // Silently capped to `/proc/sys/net/core/somaxconn`. target_os = "linux", + // Silently capped to `kern.ipc.soacceptqueue`. target_os = "freebsd", + // Silently capped to `kern.somaxconn sysctl`. target_os = "openbsd", - target_os = "macos" + // Silently capped to the default 128. + target_vendor = "apple", ))] const backlog: core::ffi::c_int = -1; #[cfg(not(any( target_os = "windows", target_os = "redox", + target_os = "espidf", + target_os = "horizon", target_os = "linux", target_os = "freebsd", target_os = "openbsd", - target_os = "macos", - target_os = "espidf", - target_os = "horizon" + target_vendor = "apple", )))] const backlog: libc::c_int = libc::SOMAXCONN;