This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>, commit-hurd at gnu dot org
- Date: Sun, 29 Dec 2019 17:51:08 +0100
- Subject: [hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR
---
sysdeps/mach/hurd/sendmsg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c
index 0c19b3223c..3d7317cec4 100644
--- a/sysdeps/mach/hurd/sendmsg.c
+++ b/sysdeps/mach/hurd/sendmsg.c
@@ -108,7 +108,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags)
/* Allocate enough room for ports. */
cmsg = CMSG_FIRSTHDR (message);
- for (; cmsg; cmsg = CMSG_NXTHDR (message, cmsg))
+ for (; cmsg; cmsg = CMSG_NXTHDR ((struct msghdr *) message, cmsg))
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS)
nports += (cmsg->cmsg_len - CMSG_ALIGN (sizeof (struct cmsghdr)))
/ sizeof (int);
@@ -119,7 +119,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags)
nports = 0;
for (cmsg = CMSG_FIRSTHDR (message);
cmsg;
- cmsg = CMSG_NXTHDR (message, cmsg))
+ cmsg = CMSG_NXTHDR ((struct msghdr *) message, cmsg))
{
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS)
{
--
2.24.0