[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR
From: |
Andreas Schwab |
Subject: |
Re: [hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR |
Date: |
Sun, 29 Dec 2019 20:09:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
On Dez 29 2019, Florian Weimer wrote:
> * Andreas Schwab:
>
>> On Dez 29 2019, Samuel Thibault wrote:
>>
>>> 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))
>>
>> Why is the first argument of __cmsg_nxthdr not const?
>
> Some programmers expect that CMSG_NXTHDR can be used to construct
> ancillary data. See bug 13500.
How is that related to the first argument?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."