net/socket: compilation error fixes on sendmsg
arm-none-eabi-gcc 7.2.1 shows below compilation error message on sendmsg
socket/sendmsg.c: In function 'sendmsg':
error: pointer targets in initialization differ in signedness
[-Werror=pointer-sign]
int *addrlen = &(msg->msg_namelen);
@@ -93,7 +93,7 @@ ssize_t sendmsg(int sockfd, struct msghdr *msg, int flags)
uint8_t *buf = (uint8_t *)(msg->msg_iov->iov_base);
size_t len = msg->msg_iov->iov_len;
struct sockaddr *to = (struct sockaddr *)msg->msg_name;
- int *addrlen = &(msg->msg_namelen);
+ int *addrlen = (int *)&(msg->msg_namelen);
return sendto(sockfd, buf, len, flags, to, (socklen_t) *addrlen);
}
