mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
Fix broken build for ESP IDF due to #119026
This commit is contained in:
parent
11035f9f52
commit
a10b3cd60f
@ -73,7 +73,7 @@ impl UnixListener {
|
|||||||
unsafe {
|
unsafe {
|
||||||
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
|
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
|
||||||
let (addr, len) = sockaddr_un(path.as_ref())?;
|
let (addr, len) = sockaddr_un(path.as_ref())?;
|
||||||
#[cfg(any(target_os = "windows", target_os = "redox"))]
|
#[cfg(any(target_os = "windows", target_os = "redox", target_os = "espidf"))]
|
||||||
const backlog: libc::c_int = 128;
|
const backlog: libc::c_int = 128;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
const backlog: libc::c_int = -1;
|
const backlog: libc::c_int = -1;
|
||||||
@ -82,7 +82,8 @@ impl UnixListener {
|
|||||||
target_os = "redox",
|
target_os = "redox",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
target_os = "openbsd"
|
target_os = "openbsd",
|
||||||
|
target_os = "espidf"
|
||||||
)))]
|
)))]
|
||||||
const backlog: libc::c_int = libc::SOMAXCONN;
|
const backlog: libc::c_int = libc::SOMAXCONN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user