diff options
| author | Josh Stone <cuviper@gmail.com> | 2016-02-14 16:27:18 -0800 |
|---|---|---|
| committer | Josh Stone <cuviper@gmail.com> | 2016-02-14 19:11:39 -0800 |
| commit | c84ab396350b81f07a87071c6b305cc513872a3e (patch) | |
| tree | b117eb88b7ea40ee106c157089bd0d10db18916d /src/libstd/sys/unix | |
| parent | 8f2d7d956ce54e77e98472f4d80e24fdf662560e (diff) | |
| download | rust-c84ab396350b81f07a87071c6b305cc513872a3e.tar.gz rust-c84ab396350b81f07a87071c6b305cc513872a3e.zip | |
std: use LFS open64 on Linux
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index a2ff0d8e1d1..e8e0a604e55 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -26,10 +26,10 @@ use sys::{cvt, cvt_r}; use sys_common::{AsInner, FromInner}; #[cfg(target_os = "linux")] -use libc::{stat64, fstat64, lstat64, off64_t, ftruncate64, lseek64, dirent64, readdir64_r}; +use libc::{stat64, fstat64, lstat64, off64_t, ftruncate64, lseek64, dirent64, readdir64_r, open64}; #[cfg(not(target_os = "linux"))] use libc::{stat as stat64, fstat as fstat64, lstat as lstat64, off_t as off64_t, - ftruncate as ftruncate64, lseek as lseek64, dirent as dirent64}; + ftruncate as ftruncate64, lseek as lseek64, dirent as dirent64, open as open64}; #[cfg(not(any(target_os = "linux", target_os = "solaris")))] use libc::{readdir_r as readdir64_r}; @@ -397,7 +397,7 @@ impl File { try!(opts.get_creation_mode()) | (opts.custom_flags as c_int & !libc::O_ACCMODE); let fd = try!(cvt_r(|| unsafe { - libc::open(path.as_ptr(), flags, opts.mode as c_int) + open64(path.as_ptr(), flags, opts.mode as c_int) })); let fd = FileDesc::new(fd); |
