Skip to content

Commit 516c73f

Browse files
committed
---
yaml --- r: 274969 b: refs/heads/stable c: dcdfed4 h: refs/heads/master i: 274967: 5c9cf29
1 parent e5e33df commit 516c73f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 1ea38f8928a017ce544faf9d025853211dbce49c
32+
refs/heads/stable: dcdfed49d7414a44bb3cfe73cf62ad2881055230
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libstd/sys/unix/fs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use os::unix::prelude::*;
1515
use ffi::{CString, CStr, OsString, OsStr};
1616
use fmt;
1717
use io::{self, Error, ErrorKind, SeekFrom};
18-
use libc::{self, dirent, c_int, off_t, mode_t};
18+
use libc::{self, dirent, c_int, mode_t};
1919
use mem;
2020
use path::{Path, PathBuf};
2121
use ptr;
@@ -26,10 +26,10 @@ use sys::{cvt, cvt_r};
2626
use sys_common::{AsInner, FromInner};
2727

2828
#[cfg(target_os = "linux")]
29-
use libc::{stat64, fstat64, lstat64, off64_t, ftruncate64};
29+
use libc::{stat64, fstat64, lstat64, off64_t, ftruncate64, lseek64};
3030
#[cfg(not(target_os = "linux"))]
3131
use libc::{stat as stat64, fstat as fstat64, lstat as lstat64, off_t as off64_t,
32-
ftruncate as ftruncate64};
32+
ftruncate as ftruncate64, lseek as lseek64};
3333

3434
pub struct File(FileDesc);
3535

@@ -461,11 +461,11 @@ impl File {
461461

462462
pub fn seek(&self, pos: SeekFrom) -> io::Result<u64> {
463463
let (whence, pos) = match pos {
464-
SeekFrom::Start(off) => (libc::SEEK_SET, off as off_t),
465-
SeekFrom::End(off) => (libc::SEEK_END, off as off_t),
466-
SeekFrom::Current(off) => (libc::SEEK_CUR, off as off_t),
464+
SeekFrom::Start(off) => (libc::SEEK_SET, off as off64_t),
465+
SeekFrom::End(off) => (libc::SEEK_END, off as off64_t),
466+
SeekFrom::Current(off) => (libc::SEEK_CUR, off as off64_t),
467467
};
468-
let n = try!(cvt(unsafe { libc::lseek(self.0.raw(), pos, whence) }));
468+
let n = try!(cvt(unsafe { lseek64(self.0.raw(), pos, whence) }));
469469
Ok(n as u64)
470470
}
471471

0 commit comments

Comments
 (0)