sys/socket: use __attribute__((packed)) to avoid changes in

the size of struct sockaddr_storage due to struct alignment
This commit is contained in:
nuttxs
2024-11-01 17:24:11 +08:00
parent b271507c9f
commit 855336bf42

View File

@@ -327,7 +327,7 @@ struct sockaddr_storage
/* Following fields are implementation-defined */
struct
struct __attribute__((packed))
{
char ss_pad1[SS_PAD1SIZE]; /* 6-byte pad; this is to make implementation-defined
* pad up to alignment field that follows explicit in