From 3371925d1804e6b7a4e94ef928ea897ded5e09fb Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Tue, 13 Dec 2011 18:33:15 +0000 Subject: THRIFT-1449. rb: Ruby client does not work on solaris (?) This patch adds a new argument to the socket calls that seems to fix the problems while not causing any detriment to non-Solaris systems. Patch: Erik Hetzner git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213837 13f79535-47bb-0310-9956-ffa450edef68 --- lib/rb/lib/thrift/transport/socket.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rb/lib') diff --git a/lib/rb/lib/thrift/transport/socket.rb b/lib/rb/lib/thrift/transport/socket.rb index 9bb20361f..dfb33fdbe 100644 --- a/lib/rb/lib/thrift/transport/socket.rb +++ b/lib/rb/lib/thrift/transport/socket.rb @@ -34,7 +34,7 @@ module Thrift def open begin - addrinfo = ::Socket::getaddrinfo(@host, @port).first + addrinfo = ::Socket::getaddrinfo(@host, @port, nil, ::Socket::SOCK_STREAM).first @handle = ::Socket.new(addrinfo[4], ::Socket::SOCK_STREAM, 0) sockaddr = ::Socket.sockaddr_in(addrinfo[1], addrinfo[3]) begin @@ -134,4 +134,4 @@ module Thrift @handle end end -end \ No newline at end of file +end -- cgit v1.2.1