From e804886c68f8c4c656c071e813637563a98a16b7 Mon Sep 17 00:00:00 2001 From: guoshichao Date: Wed, 14 Jan 2026 20:40:31 +0800 Subject: [PATCH] libuv: fix sendmsg parameter type in NuttX port Update the libuv NuttX port patch to change sendmsg() parameter from "struct msghdr *msg" to "const struct msghdr *msg" in the NuttX-specific implementation stub. This maintains compatibility after NuttX's socket API was made POSIX-compliant with const-correct parameters. Signed-off-by: guoshichao --- system/libuv/0001-libuv-port-for-nuttx.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/system/libuv/0001-libuv-port-for-nuttx.patch b/system/libuv/0001-libuv-port-for-nuttx.patch index 0c2eb18dd..2364110e6 100644 --- a/system/libuv/0001-libuv-port-for-nuttx.patch +++ b/system/libuv/0001-libuv-port-for-nuttx.patch @@ -424,7 +424,7 @@ index 00000000..298bd2f8 + return 0; + } + -+ /* Make sure the memory is initiallized to zero using calloc() */ ++ /* Make sure the memory is initialized to zero using calloc() */ + *addresses = uv__calloc(*count, sizeof(**addresses)); + if (*addresses == NULL) { + freeifaddrs(addrs); @@ -3972,3 +3972,15 @@ diff --color -ur libuv_back/src/unix/thread.c libuv/src/unix/thread.c # include # define uv__cpu_set_t cpu_set_t #elif defined(__FreeBSD__) +diff --git a/src/unix/nuttx.c b/src/unix/nuttx.c +index d0e110a..e1c962e 100644 +--- a/src/unix/nuttx.c ++++ b/src/unix/nuttx.c +@@ -222,7 +222,7 @@ ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) { + return UV_ENOTSUP; + } + +-ssize_t sendmsg(int sockfd, struct msghdr *msg, int flags) { ++ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) { + return UV_ENOTSUP; + }