@@ -26,10 +26,10 @@ use sys::{cvt, cvt_r};
26
26
use sys_common:: { AsInner , FromInner } ;
27
27
28
28
#[ 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 } ;
30
30
#[ cfg( not( target_os = "linux" ) ) ]
31
31
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 } ;
33
33
#[ cfg( not( any( target_os = "linux" , target_os = "solaris" ) ) ) ]
34
34
use libc:: { readdir_r as readdir64_r} ;
35
35
@@ -397,7 +397,7 @@ impl File {
397
397
try!( opts. get_creation_mode ( ) ) |
398
398
( opts. custom_flags as c_int & !libc:: O_ACCMODE ) ;
399
399
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 )
401
401
} ) ) ;
402
402
let fd = FileDesc :: new ( fd) ;
403
403
0 commit comments