This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new e804886c6 libuv: fix sendmsg parameter type in NuttX port
e804886c6 is described below
commit e804886c68f8c4c656c071e813637563a98a16b7
Author: guoshichao <[email protected]>
AuthorDate: Wed Jan 14 20:40:31 2026 +0800
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 <[email protected]>
---
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 <sched.h>
# 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;
+ }