diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-26 15:28:51 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-26 16:15:55 -0800 |
commit | 4840a62f3733b2f2a2c0fe88957e84d947710ab3 (patch) | |
tree | cc0475e4e07eb07cd0fdf73f539482563750bee6 /system | |
parent | f5fe8742041429a6504ee6dc535aeb3d8550dd89 (diff) |
fix sockaddr_storage and sockaddr_in
Diffstat (limited to 'system')
-rw-r--r-- | system/include/net/netinet/in.h | 4 | ||||
-rw-r--r-- | system/include/sys/socket.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/system/include/net/netinet/in.h b/system/include/net/netinet/in.h index 2ac98dfe..e32bf3ee 100644 --- a/system/include/net/netinet/in.h +++ b/system/include/net/netinet/in.h @@ -25,10 +25,10 @@ struct in_addr { }; struct sockaddr_in { - short sin_family; + int sin_family; unsigned short sin_port; struct in_addr sin_addr; - char sin_zero[8]; + char sin_zero[6]; }; struct in6_addr { diff --git a/system/include/sys/socket.h b/system/include/sys/socket.h index 10ba5ce8..e9b6c770 100644 --- a/system/include/sys/socket.h +++ b/system/include/sys/socket.h @@ -47,7 +47,10 @@ struct sockaddr { }; struct sockaddr_storage { - sa_family_t ss_family; + sa_family_t ss_family; + unsigned short ss_port; + unsigned long ss_addr; + char ss_zero[6]; }; ssize_t recvfrom(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len); |