зеркало из https://github.com/github/ruby.git
* 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:
Родитель
b0b460925c
Коммит
7371736e49
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче