about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/net.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/unix/net.rs')
-rw-r--r--library/std/src/sys/pal/unix/net.rs6
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(