diff --git a/ChangeLog b/ChangeLog index 046d98f043..1326f4d004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 19 10:33:46 2015 Nobuyoshi Nakada + + * 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 * file.c (rb_file_identical_p): not necessary to compare the paths after diff --git a/ext/socket/init.c b/ext/socket/init.c index 00e20fa308..1710129519 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -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)); }