@@ -71,22 +71,7 @@ impl FileDesc {
7171 #[ cfg( target_os = "android" ) ]
7272 use super :: android:: cvt_pread64;
7373
74- #[ cfg( target_os = "emscripten" ) ]
75- unsafe fn cvt_pread64 ( fd : c_int , buf : * mut c_void , count : usize , offset : i64 )
76- -> io:: Result < isize >
77- {
78- use crate :: convert:: TryInto ;
79- use libc:: pread64;
80- // pread64 on emscripten actually takes a 32 bit offset
81- if let Ok ( o) = offset. try_into ( ) {
82- cvt ( pread64 ( fd, buf, count, o) )
83- } else {
84- Err ( io:: Error :: new ( io:: ErrorKind :: InvalidInput ,
85- "cannot pread >2GB" ) )
86- }
87- }
88-
89- #[ cfg( not( any( target_os = "android" , target_os = "emscripten" ) ) ) ]
74+ #[ cfg( not( target_os = "android" ) ) ]
9075 unsafe fn cvt_pread64 ( fd : c_int , buf : * mut c_void , count : usize , offset : i64 )
9176 -> io:: Result < isize >
9277 {
@@ -128,22 +113,7 @@ impl FileDesc {
128113 #[ cfg( target_os = "android" ) ]
129114 use super :: android:: cvt_pwrite64;
130115
131- #[ cfg( target_os = "emscripten" ) ]
132- unsafe fn cvt_pwrite64 ( fd : c_int , buf : * const c_void , count : usize , offset : i64 )
133- -> io:: Result < isize >
134- {
135- use crate :: convert:: TryInto ;
136- use libc:: pwrite64;
137- // pwrite64 on emscripten actually takes a 32 bit offset
138- if let Ok ( o) = offset. try_into ( ) {
139- cvt ( pwrite64 ( fd, buf, count, o) )
140- } else {
141- Err ( io:: Error :: new ( io:: ErrorKind :: InvalidInput ,
142- "cannot pwrite >2GB" ) )
143- }
144- }
145-
146- #[ cfg( not( any( target_os = "android" , target_os = "emscripten" ) ) ) ]
116+ #[ cfg( not( target_os = "android" ) ) ]
147117 unsafe fn cvt_pwrite64 ( fd : c_int , buf : * const c_void , count : usize , offset : i64 )
148118 -> io:: Result < isize >
149119 {
0 commit comments