@@ -26,10 +26,10 @@ use sys::{cvt, cvt_r};
2626use 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" ) ) ]
3131use 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" ) ) ) ]
3434use 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