ruby-changes:18361
From: akr <ko1@a...>
Date: Sun, 26 Dec 2010 19:38:53 +0900 (JST)
Subject: [ruby-changes:18361] Ruby:r30384 (trunk): * ext/socket/option.c: define IFNAMSIZ if not available.
akr 2010-12-26 19:38:44 +0900 (Sun, 26 Dec 2010) New Revision: 30384 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30384 Log: * ext/socket/option.c: define IFNAMSIZ if not available. fix compilation error on mingw32. reported by nobu. Modified files: trunk/ChangeLog trunk/ext/socket/option.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30383) +++ ChangeLog (revision 30384) @@ -1,3 +1,8 @@ +Sun Dec 26 19:37:37 2010 Tanaka Akira <akr@f...> + + * ext/socket/option.c: define IFNAMSIZ if not available. + fix compilation error on mingw32. reported by nobu. + Sun Dec 26 12:16:29 2010 Nobuyoshi Nakada <nobu@r...> * lib/rdoc/ri/paths.rb (RDoc::RI::Paths::HOMEDIR): no exception if Index: ext/socket/option.c =================================================================== --- ext/socket/option.c (revision 30383) +++ ext/socket/option.c (revision 30384) @@ -465,6 +465,9 @@ else return snprintf(buf, len, "%s%s", succ_prefix, ifbuf); #else +# ifndef IFNAMSIZ +# define IFNAMSIZ (sizeof(unsigned int)*3+1) +# endif return snprintf(buf, len, "%s%u", fail_prefix, ifindex); #endif } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/