about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/net.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-25 08:43:14 +0000
committerbors <bors@rust-lang.org>2024-09-25 08:43:14 +0000
commit2933f68abefa9e56ac336cb686a435a54e8a1f21 (patch)
tree6b6f977103ad8c0acd842f4e2c3431fd3255701e /library/std/src/sys/pal/unix/net.rs
parent4c62024cd5dbafb64941bded422e4fbc2a100e73 (diff)
parent9d134cc26a3b8a9d4c6e75c8f61fbd2ad168093b (diff)
downloadrust-2933f68abefa9e56ac336cb686a435a54e8a1f21.tar.gz
rust-2933f68abefa9e56ac336cb686a435a54e8a1f21.zip
Auto merge of #130816 - matthiaskrgr:rollup-jy25phv, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #130549 (Add RISC-V vxworks targets)
 - #130595 (Initial std library support for NuttX)
 - #130734 (Fix: ices on virtual-function-elimination about principal trait)
 - #130787 (Ban combination of GCE and new solver)
 - #130809 (Update llvm triple for OpenHarmony targets)
 - #130810 (Don't trap into the debugger on panics under Linux)

r? `@ghost`
`@rustbot` modify labels: rollup
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(