mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-06 18:54:18 +00:00
Use a union to let struct sockaddr have the same alignment requirements as struct sockaddr_in
This commit is contained in:
parent
36d7f50d77
commit
2621e3fa19
@ -59,7 +59,13 @@ struct sockaddr_in {
|
|||||||
struct sockaddr {
|
struct sockaddr {
|
||||||
u8_t sa_len;
|
u8_t sa_len;
|
||||||
u8_t sa_family;
|
u8_t sa_family;
|
||||||
char sa_data[14];
|
union {
|
||||||
|
char bytes[14];
|
||||||
|
struct {
|
||||||
|
u16_t a1;
|
||||||
|
u32_t a2;
|
||||||
|
} alignment;
|
||||||
|
} sa_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef socklen_t
|
#ifndef socklen_t
|
||||||
|
Loading…
Reference in New Issue
Block a user