[前][次][番号順一覧][スレッド一覧]

ruby-changes:40109

From: nobu <ko1@a...>
Date: Mon, 19 Oct 2015 10:34:23 +0900 (JST)
Subject: [ruby-changes:40109] nobu:r52190 (trunk): init.c: glibc bug

nobu	2015-10-19 10:33:49 +0900 (Mon, 19 Oct 2015)

  New Revision: 52190

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52190

  Log:
    init.c: glibc bug
    
    * ext/socket/init.c (rsock_raise_socket_error): get rid of a glibc
      bug.  [ruby-core:71100] [Bug #11600]

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/init.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52189)
+++ ChangeLog	(revision 52190)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Oct 19 10:33:46 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* file.c (rb_file_identical_p): not necessary to compare the paths after
Index: ext/socket/init.c
===================================================================
--- ext/socket/init.c	(revision 52189)
+++ ext/socket/init.c	(revision 52190)
@@ -35,7 +35,9 @@ void https://github.com/ruby/ruby/blob/trunk/ext/socket/init.c#L35
 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));
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]