Skip to content

Commit

Permalink
Fix IPAddr memory layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Feb 6, 2024
1 parent 0801372 commit ee5a2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace net {
union {
in6_addr addr = {};
struct { uint16_t _1, _2, _3, _4, _5, _6; uint8_t a, b, c, d; };
};
} __attribute__((packed));
// For compatibility, the default constructor is still 0.0.0.0 (IPv4)
IPAddr() {
map_v4(htonl(INADDR_ANY));
Expand Down

0 comments on commit ee5a2f5

Please sign in to comment.