diff options
| author | Huang Qi <huangqi3@xiaomi.com> | 2024-09-19 16:00:56 +0800 | 
|---|---|---|
| committer | Huang Qi <huangqi3@xiaomi.com> | 2024-09-24 15:35:40 +0800 | 
| commit | 24f622cf801a840b0ad879ce5907f2cf316e26e8 (patch) | |
| tree | 36784c7813d4ef84d04cb234de49deba1ac76ea4 /library/std/src/sys/pal/unix/net.rs | |
| parent | f5cd2c5888011d4d80311e5b771c6da507d860dd (diff) | |
| download | rust-24f622cf801a840b0ad879ce5907f2cf316e26e8.tar.gz rust-24f622cf801a840b0ad879ce5907f2cf316e26e8.zip | |
Initial std library support for NuttX
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Diffstat (limited to 'library/std/src/sys/pal/unix/net.rs')
| -rw-r--r-- | library/std/src/sys/pal/unix/net.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/library/std/src/sys/pal/unix/net.rs b/library/std/src/sys/pal/unix/net.rs index e98232ba89a..0f2e015bbcd 100644 --- a/library/std/src/sys/pal/unix/net.rs +++ b/library/std/src/sys/pal/unix/net.rs @@ -38,19 +38,19 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { // We may need to trigger a glibc workaround. See on_resolver_failure() for details. on_resolver_failure(); - #[cfg(not(target_os = "espidf"))] + #[cfg(not(any(target_os = "espidf", target_os = "nuttx")))] if err == libc::EAI_SYSTEM { return Err(io::Error::last_os_error()); } - #[cfg(not(target_os = "espidf"))] + #[cfg(not(any(target_os = "espidf", target_os = "nuttx")))] let detail = unsafe { // We can't always expect a UTF-8 environment. When we don't get that luxury, // it's better to give a low-quality error message than none at all. CStr::from_ptr(libc::gai_strerror(err)).to_string_lossy() }; - #[cfg(target_os = "espidf")] + #[cfg(any(target_os = "espidf", target_os = "nuttx"))] let detail = ""; Err(io::Error::new( | 
