summaryrefslogtreecommitdiff
path: root/ext/socket/init.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-27 11:07:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-27 11:07:41 +0000
commit2d958b7fb03e44e3d65347147e5781e55a8e3b72 (patch)
tree7773f7de7a39ebaf5dfee17907d057cecf06891c /ext/socket/init.c
parent9c29032c7316c1e6f876c497f0eb80b62b32ba16 (diff)
* ext/socket/init.c (socks_connect_blocking): moved from
sockssocket.c. [ruby-dev:37834] * sockssocket.c (socks_init): don't omit "int" type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/init.c')
-rw-r--r--ext/socket/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 1859777e9ea..a21c7300300 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -333,6 +333,15 @@ connect_blocking(void *data)
return (VALUE)connect(arg->fd, arg->sockaddr, arg->len);
}
+#if defined(SOCKS) && !defined(SOCKS5)
+static VALUE
+socks_connect_blocking(void *data)
+{
+ struct connect_arg *arg = data;
+ return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len);
+}
+#endif
+
int
ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
{