summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 17:41:49 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 17:41:49 +0000
commit93121d99c9f6e14dbc45987e3fc6b1107daba4a5 (patch)
treec656939dbe73697f0ad4fbc5e1d1cbf54e6e6f00 /io.c
parentd42a249334ab4884db0162d4562b34ab9c7965c1 (diff)
* io.c (nogvl_copy_stream_sendfile): mixed decls not allowed.
* include/ruby/ruby.h (rb_intern): C90 needs nonempty macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index f9c01f3839..eccc93b141 100644
--- a/io.c
+++ b/io.c
@@ -8078,8 +8078,9 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
if (use_pread)
copy_length = src_stat.st_size - src_offset;
else {
+ off_t cur;
errno = 0;
- off_t cur = lseek(stp->src_fd, 0, SEEK_CUR);
+ cur = lseek(stp->src_fd, 0, SEEK_CUR);
if (cur == (off_t)-1 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;