summaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-06 11:11:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-06 11:11:07 +0000
commit549525ae5610df980290d8081b3d60a756a0a8f1 (patch)
tree6245fc334b333763c21439c593e0cea72a1c9f77 /ext/socket/socket.c
parent4eaa23c83d56cef645c1a6448426737721340a4d (diff)
downloadruby-549525ae5610df980290d8081b3d60a756a0a8f1.tar.gz
ruby-549525ae5610df980290d8081b3d60a756a0a8f1.tar.xz
ruby-549525ae5610df980290d8081b3d60a756a0a8f1.zip
* ext/socket/extconf.rb: check recvmsg even if sendmsg is exists.
* ext/socket/socket.c (thread_read_select): restored. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index ca7bdc50c..95ec45bfe 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1502,6 +1502,19 @@ unix_send_io(sock, val)
#endif
}
+#if defined(HAVE_RECVMSG) && (defined(HAVE_ST_MSG_CONTROL) || defined(HAVE_ST_MSG_ACCRIGHTS))
+static void
+thread_read_select(fd)
+ int fd;
+{
+ fd_set fds;
+
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+ rb_thread_select(fd+1, &fds, 0, 0, 0);
+}
+#endif
+
static VALUE
unix_recv_io(argc, argv, sock)
int argc;