summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
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 ca7bdc50c2..95ec45bfe6 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;