Rollup merge of #138972 - thaliaarchi:nuttx-build, r=Mark-Simulacrum

std: Fix build for NuttX targets

Fix std build for all NuttX targets. It is the single largest set of failures on <https://does-it-build.noratrieb.dev/>. Although, ESP-IDF also requires these same gates, there are other issues for those targets.

This can verified be running `x check library/std --target=` for all NuttX targets.

cc ``@no1wudi``
This commit is contained in:
Chris Denton 2025-04-13 11:48:15 +00:00 committed by GitHub
commit 9d2d6a040f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -71,9 +71,11 @@ const fn max_iov() -> usize {
target_os = "android",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "espidf",
target_os = "freebsd",
target_os = "linux",
target_os = "netbsd",
target_os = "nuttx",
target_os = "nto",
target_os = "openbsd",
target_os = "horizon",

View File

@ -1,5 +1,6 @@
use libc::{MSG_PEEK, c_int, c_void, size_t, sockaddr, socklen_t};
#[cfg(not(any(target_os = "espidf", target_os = "nuttx")))]
use crate::ffi::CStr;
use crate::io::{self, BorrowedBuf, BorrowedCursor, IoSlice, IoSliceMut};
use crate::net::{Shutdown, SocketAddr};