From 7608dd9d85e5e2ccb347ce6666cbfaa716161a76 Mon Sep 17 00:00:00 2001 From: wanglei Date: Tue, 7 Jul 2026 17:16:37 +0800 Subject: [PATCH] nuttx: type IovLen to c_ulong The `msg_iovlen` is the `unsigned long` in the Nuttx. The origin define is as follows, in nuttx/include/sys/socket.h ``` struct msghdr { FAR void *msg_name; socklen_t msg_namelen; FAR struct iovec *msg_iov; unsigned long msg_iovlen; FAR void *msg_control; unsigned long msg_controllen; unsigned int msg_flags; }; ``` Signed-off-by: wanglei --- src/sys/unix.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 74e98ebd..a226fe13 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -432,11 +432,12 @@ type IovLen = usize; target_os = "tvos", target_os = "watchos", target_os = "espidf", - target_os = "nuttx", target_os = "vita", target_os = "cygwin", ))] type IovLen = c_int; +#[cfg(target_os = "nuttx")] +type IovLen = libc::c_ulong; /// Unix only API. impl Domain {