[PATCH] in6_addr: add 64-bit union accessors
Mike Frysinger
vapier@gentoo.org
Mon Mar 30 00:56:00 GMT 2015
On 29 Mar 2015 16:15, Shawn Landden wrote:
> I'm not going to change the ChangeLog because that practice
> breaks git merges.
you still should post it in the commit message. people don't want to write it
for you.
> --- a/inet/netinet/in.h
> +++ b/inet/netinet/in.h
> @@ -214,12 +214,14 @@ struct in6_addr
> #ifdef __USE_MISC
> uint16_t __u6_addr16[8];
> uint32_t __u6_addr32[4];
> + uint64_t __u6_addr64[2];
> #endif
> } __in6_u;
> #define s6_addr __in6_u.__u6_addr8
> #ifdef __USE_MISC
> # define s6_addr16 __in6_u.__u6_addr16
> # define s6_addr32 __in6_u.__u6_addr32
> +# define s6_addr64 __in6_u.__u6_addr64
> #endif
> };
> #endif /* !__USE_KERNEL_IPV6_DEFS */
in general, i like this, but you're changing the alignment requirements which in
turn means you're possibly changing the ABI. a library that takes this struct
as an argument built against older glibc would require 32bit alignment, but an
app might be expecting 64bit after this change. any such impact has to be
considered before merging.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150330/7df91b2c/attachment.sig>
More information about the Libc-alpha
mailing list