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

ruby-changes:36633

From: nobu <ko1@a...>
Date: Fri, 5 Dec 2014 17:09:22 +0900 (JST)
Subject: [ruby-changes:36633] nobu:r48714 (trunk): socket/option.c: fix inet_ntop link error on mswin

nobu	2014-12-05 17:09:12 +0900 (Fri, 05 Dec 2014)

  New Revision: 48714

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

  Log:
    socket/option.c: fix inet_ntop link error on mswin
    
    * ext/socket/option.c (inet_ntop): link aliased inet_ntop in
      libruby on mswin not rb_w32_inet_ntop which fails to link for
      unknown reason.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/option.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48713)
+++ ChangeLog	(revision 48714)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec  5 17:09:09 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/socket/option.c (inet_ntop): link aliased inet_ntop in
+	  libruby on mswin not rb_w32_inet_ntop which fails to link for
+	  unknown reason.
+
 Fri Dec  5 11:09:54 2014  Eric Wong  <e@8...>
 
 	* iseq.c (prepare_iseq_build): remove unused block_opt param
Index: ext/socket/option.c
===================================================================
--- ext/socket/option.c	(revision 48713)
+++ ext/socket/option.c	(revision 48714)
@@ -658,8 +658,10 @@ inet_ntop(int af, const void *addr, char https://github.com/ruby/ruby/blob/trunk/ext/socket/option.c#L658
 #endif
     return numaddr;
 }
-#elif defined _WIN32
+#elif defined __MINGW32__
 # define inet_ntop(f,a,n,l)      rb_w32_inet_ntop(f,a,n,l)
+#elif defined _MSC_VER && RUBY_MSVCRT_VERSION < 90
+const char *WSAAPI inet_ntop(int, const void *, char *, size_t);
 #endif
 
 /* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295".  */

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

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