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: Rich Felker <dalias at libc dot org>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 21 Apr 2016 13:14:59 -0400
- 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 Mon, Mar 28, 2016 at 11:34:00AM -0300, Adhemerval Zanella wrote:
> POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
> to be of size int and socklen_t respectively. However Linux defines it as
> both size_t and for 64-bit it requires some adjustments to make the
> functions standard compliance.
>
> This patch fixes it by creating a temporary header and zeroing the pad
> fields for 64-bits architecture where size of size_t exceeds the size of
> the int.
>
> Also the new recvmsg and sendmsg implementation is only added on libc,
> with libpthread only containing a compat symbol.
Just a heads-up: this needs a bug report/patch to the Linux man-pages
project as well, since they're currently documenting the wrong types.
The documented types should probably be fixed to align with the
standard, with a note about them previously being wrong added to the
NOTES section.
Rich