net: make the sendmsg param type consistent with posix specification

To ensure consistency, in all places where the "sendmsg" function is used
either directly or indirectly, the type of the "struct msghdr *msg" parameter
needs to be modified to "const struct msghdr *msg".

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2025-01-14 15:12:30 +08:00
committed by GUIDINGLI
parent 9de3b79e2c
commit 57637e5927
23 changed files with 44 additions and 42 deletions
+2 -2
View File
@@ -412,7 +412,7 @@ static inline FAR struct cmsghdr *__cmsg_nxthdr(FAR void *__ctl,
return __ptr;
}
static inline FAR struct cmsghdr *cmsg_nxthdr(FAR struct msghdr *__msg,
static inline FAR struct cmsghdr *cmsg_nxthdr(FAR const struct msghdr *__msg,
FAR struct cmsghdr *__cmsg)
{
return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
@@ -462,7 +462,7 @@ int getpeername(int sockfd, FAR struct sockaddr *addr,
FAR socklen_t *addrlen);
ssize_t recvmsg(int sockfd, FAR struct msghdr *msg, int flags);
ssize_t sendmsg(int sockfd, FAR struct msghdr *msg, int flags);
ssize_t sendmsg(int sockfd, FAR const struct msghdr *msg, int flags);
#if CONFIG_FORTIFY_SOURCE > 0
fortify_function(send) ssize_t send(int sockfd, FAR const void *buf,