From: Andreas Schwab <schwab@suse.de>
To: fweimer@redhat.com (Florian Weimer)
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Make padding in struct sockaddr_storage explicit [BZ #20111]
Date: Thu, 19 May 2016 13:52:00 -0000 [thread overview]
Message-ID: <mvm60ua5fpa.fsf@hawking.suse.de> (raw)
In-Reply-To: <20160519131238.1C38540113D03@oldenburg.str.redhat.com> (Florian Weimer's message of "Thu, 19 May 2016 15:12:38 +0200")
fweimer@redhat.com (Florian Weimer) writes:
> diff --git a/bits/socket.h b/bits/socket.h
> index ab9f242..b3f2753 100644
> --- a/bits/socket.h
> +++ b/bits/socket.h
> @@ -164,6 +164,7 @@ struct sockaddr
> struct sockaddr_storage
> {
> __SOCKADDR_COMMON (ss_); /* Address family, etc. */
> + char __ss_padding_init[sizeof (__ss_aligntype) - __SOCKADDR_COMMON_SIZE];
That needs to be __alignof, otherwise you change the layout, and you
need to watch out for zero padding.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2016-05-19 13:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 13:40 Florian Weimer
2016-05-19 13:52 ` Andreas Schwab [this message]
2016-05-19 14:37 ` Florian Weimer
2016-05-19 15:28 ` Andreas Schwab
2016-05-19 15:48 ` Florian Weimer
2016-05-19 16:12 ` Andreas Schwab
2016-05-20 8:56 ` Florian Weimer
2016-05-23 8:44 ` Andreas Schwab
2016-05-23 8:57 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvm60ua5fpa.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).