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

ruby-changes:28547

From: akr <ko1@a...>
Date: Tue, 7 May 2013 12:20:13 +0900 (JST)
Subject: [ruby-changes:28547] akr:r40599 (trunk): * ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to

akr	2013-05-07 12:19:52 +0900 (Tue, 07 May 2013)

  New Revision: 40599

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

  Log:
    * ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to
      suppress warning.
      Bionic defines socklen_t as int.
      Bionic defines msg_controllen as unsigned int (__kernel_size_t)
      instead of socklen_t as POSIX.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/ancdata.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40598)
+++ ChangeLog	(revision 40599)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue May  7 12:15:24 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to
+	  suppress warning.
+	  Bionic defines socklen_t as int.
+	  Bionic defines msg_controllen as unsigned int (__kernel_size_t)
+	  instead of socklen_t as POSIX.
+
 Tue May  7 12:12:42 2013  Tanaka Akira  <akr@f...>
 
 	* ext/socket/ancdata.c (ancillary_inspect): Don't call
Index: ext/socket/ancdata.c
===================================================================
--- ext/socket/ancdata.c	(revision 40598)
+++ ext/socket/ancdata.c	(revision 40599)
@@ -1632,7 +1632,7 @@ bsock_recvmsg_internal(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1632
         if (NIL_P(vmaxctllen) && (mh.msg_flags & MSG_CTRUNC)) {
 #define BIG_ENOUGH_SPACE 65536
             if (BIG_ENOUGH_SPACE < maxctllen &&
-                mh.msg_controllen < (socklen_t)(maxctllen - BIG_ENOUGH_SPACE)) {
+                (socklen_t)mh.msg_controllen < (socklen_t)(maxctllen - BIG_ENOUGH_SPACE)) {
                 /* there are big space bug truncated.
                  * file descriptors limit? */
                 if (!gc_done) {

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

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