mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/socket.c (sockaddr_len): return the shortest length for
unknown socket address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0b460925c
commit
7371736e49
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Mar 26 22:31:10 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/socket.c (sockaddr_len): return the shortest length for
|
||||
unknown socket address.
|
||||
|
||||
Tue Mar 26 22:14:46 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
|
||||
|
|
|
@ -1512,7 +1512,7 @@ sockaddr_len(struct sockaddr *addr)
|
|||
#endif
|
||||
|
||||
default:
|
||||
return (socklen_t)sizeof(struct sockaddr_in);
|
||||
return (socklen_t)(offsetof(struct sockaddr, sa_family) + sizeof(addr->sa_family));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue