diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 22:13:02 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 22:13:02 +0000 |
commit | 81f4dba3850f108dbd1c9aad5f175a8e9fbfe5f4 (patch) | |
tree | f008f1849fd8bab33010873e1f4ad40029a01c67 /io.c | |
parent | 1684c2349668e6d8fb2491f209ba7eb9f875e560 (diff) | |
download | ruby-81f4dba3850f108dbd1c9aad5f175a8e9fbfe5f4.tar.gz |
* io.c (nogvl_copy_stream_sendfile): ISO C90 forbids mixed declarations and code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 { - errno = 0; - off_t cur = lseek(stp->src_fd, 0, SEEK_CUR); + off_t cur; + errno = 0; + cur = lseek(stp->src_fd, 0, SEEK_CUR); if (cur == (off_t)-1 && errno) { stp->syserr = "lseek"; stp->error_no = errno; |