Skip to content

Commit c84ab39

Browse files
committed
std: use LFS open64 on Linux
1 parent 8f2d7d9 commit c84ab39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/sys/unix/fs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -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, lseek64, dirent64, readdir64_r};
29+
use libc::{stat64, fstat64, lstat64, off64_t, ftruncate64, lseek64, dirent64, readdir64_r, open64};
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, lseek as lseek64, dirent as dirent64};
32+
ftruncate as ftruncate64, lseek as lseek64, dirent as dirent64, open as open64};
3333
#[cfg(not(any(target_os = "linux", target_os = "solaris")))]
3434
use libc::{readdir_r as readdir64_r};
3535

@@ -397,7 +397,7 @@ impl File {
397397
try!(opts.get_creation_mode()) |
398398
(opts.custom_flags as c_int & !libc::O_ACCMODE);
399399
let fd = try!(cvt_r(|| unsafe {
400-
libc::open(path.as_ptr(), flags, opts.mode as c_int)
400+
open64(path.as_ptr(), flags, opts.mode as c_int)
401401
}));
402402
let fd = FileDesc::new(fd);
403403

0 commit comments

Comments
 (0)