@@ -71,22 +71,7 @@ impl FileDesc {
71
71
#[ cfg( target_os = "android" ) ]
72
72
use super :: android:: cvt_pread64;
73
73
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" ) ) ]
90
75
unsafe fn cvt_pread64 ( fd : c_int , buf : * mut c_void , count : usize , offset : i64 )
91
76
-> io:: Result < isize >
92
77
{
@@ -128,22 +113,7 @@ impl FileDesc {
128
113
#[ cfg( target_os = "android" ) ]
129
114
use super :: android:: cvt_pwrite64;
130
115
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" ) ) ]
147
117
unsafe fn cvt_pwrite64 ( fd : c_int , buf : * const c_void , count : usize , offset : i64 )
148
118
-> io:: Result < isize >
149
119
{
0 commit comments