summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/init.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 046d98f043c..1326f4d0046 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 00e20fa308f..1710129519e 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));
}