mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
AIX doesn't set OptionLength for boolean options
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180904T103302Z.fail.html.gz https://www.ibm.com/support/knowledgecenter/ja/ssw_aix_72/com.ibm.aix.commtrf2/getsockopt.htm git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4fcd9d708f
commit
24418e0c77
1 changed files with 12 additions and 0 deletions
|
@ -314,6 +314,18 @@ bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
|
||||||
level = rsock_level_arg(family, lev);
|
level = rsock_level_arg(family, lev);
|
||||||
option = rsock_optname_arg(family, level, optname);
|
option = rsock_optname_arg(family, level, optname);
|
||||||
len = 256;
|
len = 256;
|
||||||
|
#ifdef Qnil
|
||||||
|
switch (option) {
|
||||||
|
case SO_DEBUG:
|
||||||
|
case SO_REUSEADDR:
|
||||||
|
case SO_KEEPALIVE:
|
||||||
|
case SO_DONTROUTE:
|
||||||
|
case SO_BROADCAST:
|
||||||
|
case SO_OOBINLINE:
|
||||||
|
/* AIX doesn' set len for boolean options */
|
||||||
|
len = sizeof(int);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
buf = ALLOCA_N(char,len);
|
buf = ALLOCA_N(char,len);
|
||||||
|
|
||||||
rb_io_check_closed(fptr);
|
rb_io_check_closed(fptr);
|
||||||
|
|
Loading…
Reference in a new issue