sys/socket.h: Since ss_family is of type uint16_t (2-byte alignment),
packing the internal substructures will reduce the overall alignment of `sockaddr_storage` to 2, which triggers an unaligned access warning in 32-bit systems. Add an overall 8-byte alignment to the outermost layer of the structure. Related commit: 855336bf Refer to https://datatracker.ietf.org/doc/html/rfc2553#section-3.10 Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
This commit is contained in:
parent
93c1e0c633
commit
7470fd9274
1 changed files with 1 additions and 1 deletions
|
|
@ -323,7 +323,7 @@
|
|||
* the fields of those structures without alignment problems.
|
||||
*/
|
||||
|
||||
struct sockaddr_storage
|
||||
struct aligned_data(SS_ALIGNSIZE) sockaddr_storage
|
||||
{
|
||||
sa_family_t ss_family; /* Address family */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue