mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
init.c: glibc bug
* ext/socket/init.c (rsock_raise_socket_error): get rid of a glibc bug. [ruby-core:71100] [Bug #11600] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3ef4dfdcf6
commit
7594a99322
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 19 10:33:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/socket/init.c (rsock_raise_socket_error): get rid of a glibc
|
||||
bug. [ruby-core:71100] [Bug #11600]
|
||||
|
||||
Mon Oct 19 01:26:26 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* file.c (rb_file_identical_p): not necessary to compare the paths after
|
||||
|
|
|
@ -35,7 +35,9 @@ void
|
|||
rsock_raise_socket_error(const char *reason, int error)
|
||||
{
|
||||
#ifdef EAI_SYSTEM
|
||||
if (error == EAI_SYSTEM) rb_sys_fail(reason);
|
||||
int e;
|
||||
if (error == EAI_SYSTEM && (e = errno) != 0)
|
||||
rb_syserr_fail(e, reason);
|
||||
#endif
|
||||
rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue