From ae167e1e79c73c589f0f410b1582795d17184205 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 29 Dec 2010 12:20:16 +0000 Subject: * io.c (maygvl_copy_stream_wait_readwrite): define if USE_SENDFILE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 76e483a7a9..069b4fb1d2 100644 --- a/io.c +++ b/io.c @@ -8370,22 +8370,6 @@ nogvl_copy_stream_wait_write(struct copy_stream_struct *stp) return 0; } -static int -maygvl_copy_stream_wait_readwrite(struct copy_stream_struct *stp) -{ - int ret; - rb_fd_zero(&stp->fds); - rb_fd_set(stp->src_fd, &stp->fds); - rb_fd_set(stp->dst_fd, &stp->fds); - ret = rb_fd_select(rb_fd_max(&stp->fds), &stp->fds, NULL, NULL, NULL); - if (ret == -1) { - stp->syserr = "select"; - stp->error_no = errno; - return -1; - } - return 0; -} - #ifdef HAVE_SENDFILE # ifdef __linux__ @@ -8438,6 +8422,22 @@ simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count) #endif #ifdef USE_SENDFILE +static int +maygvl_copy_stream_wait_readwrite(struct copy_stream_struct *stp) +{ + int ret; + rb_fd_zero(&stp->fds); + rb_fd_set(stp->src_fd, &stp->fds); + rb_fd_set(stp->dst_fd, &stp->fds); + ret = rb_fd_select(rb_fd_max(&stp->fds), &stp->fds, NULL, NULL, NULL); + if (ret == -1) { + stp->syserr = "select"; + stp->error_no = errno; + return -1; + } + return 0; +} + static int nogvl_copy_stream_sendfile(struct copy_stream_struct *stp) { -- cgit v1.2.3