From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119485 invoked by alias); 7 Apr 2016 09:56:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 119473 invoked by uid 89); 7 Apr 2016 09:56:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=iov, risk, our, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Subject: Re: [PATCH 2/3] network: recvmsg and sendmsg standard compliance (BZ#16919) To: Adhemerval Zanella References: <1459175641-12520-1-git-send-email-adhemerval.zanella@linaro.org> <1459175641-12520-3-git-send-email-adhemerval.zanella@linaro.org> Cc: libc-alpha@sourceware.org From: Florian Weimer Message-ID: <57062EC6.20504@redhat.com> Date: Thu, 07 Apr 2016 09:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459175641-12520-3-git-send-email-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-04/txt/msg00095.txt.bz2 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