This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/3] network: recvmsg and sendmsg standard compliance (BZ#16919)
- From: Florian Weimer <fweimer at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 7 Apr 2016 11:56:22 +0200
- Subject: Re: [PATCH 2/3] network: recvmsg and sendmsg standard compliance (BZ#16919)
- Authentication-results: sourceware.org; auth=none
- References: <1459175641-12520-1-git-send-email-adhemerval dot zanella at linaro dot org> <1459175641-12520-3-git-send-email-adhemerval dot zanella at linaro dot org>
On 03/28/2016 04:34 PM, Adhemerval Zanella wrote:
> diff --git a/sysdeps/unix/sysv/linux/check_native.c b/sysdeps/unix/sysv/linux/check_native.c
> index b3cbbe3..a8e447e 100644
> --- a/sysdeps/unix/sysv/linux/check_native.c
> +++ b/sysdeps/unix/sysv/linux/check_native.c
> @@ -111,10 +111,13 @@ __check_native (uint32_t a1_index, int *a1_native,
> {
> struct msghdr msg =
> {
> - (void *) &nladdr, sizeof (nladdr),
> - &iov, 1,
> - NULL, 0,
> - 0
> + .msg_name = (void *) &nladdr,
> + .msg_namelen = sizeof (nladdr),
> + .msg_iov = &iov,
> + .msg_iovlen = 1,
> + .msg_control = NULL,
> + .msg_controllen = 0,
> + .msg_flags = 0
> };
The requirement for such changes always makes me nervous. If we have
breakage in our own code, how many applications are affected?
Note that the recvmsg manual page says “is defined as follows” about
struct msghdr, not “contains the following members in some arbitrary order”.
Is standards compliance here really worth this risk?
(I do not have a strong opinion either way, I just want to raise this
point.)
Florian