@@ -97,7 +97,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{
97
97
/// therefore not represented in Rust by an actual slice as `IoVec` is. It
98
98
/// is used with [`process_vm_readv`](fn.process_vm_readv.html)
99
99
/// and [`process_vm_writev`](fn.process_vm_writev.html).
100
- #[ cfg( target_os = "linux" ) ]
100
+ #[ cfg( any ( target_os = "linux" , target_os = "android" ) ) ]
101
101
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
102
102
#[ repr( C ) ]
103
103
#[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
@@ -125,13 +125,13 @@ feature! {
125
125
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
126
126
/// target process and the OS must have unprivileged debugging enabled.
127
127
///
128
- /// This function is only available on Linux.
128
+ /// This function is only available on Linux and Android(SDK23+) .
129
129
///
130
130
/// [`process_vm_writev`(2)]: https://man7.org/linux/man-pages/man2/process_vm_writev.2.html
131
131
/// [ptrace]: ../ptrace/index.html
132
132
/// [`IoVec`]: struct.IoVec.html
133
133
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
134
- #[ cfg( all( target_os = "linux" , not( target_env = "uclibc" ) ) ) ]
134
+ #[ cfg( all( any ( target_os = "linux" , target_os = "android" ) , not( target_env = "uclibc" ) ) ) ]
135
135
pub fn process_vm_writev(
136
136
pid: crate :: unistd:: Pid ,
137
137
local_iov: & [ IoVec <& [ u8 ] >] ,
@@ -160,13 +160,13 @@ pub fn process_vm_writev(
160
160
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
161
161
/// target process and the OS must have unprivileged debugging enabled.
162
162
///
163
- /// This function is only available on Linux.
163
+ /// This function is only available on Linux and Android(SDK23+) .
164
164
///
165
165
/// [`process_vm_readv`(2)]: https://man7.org/linux/man-pages/man2/process_vm_readv.2.html
166
166
/// [`ptrace`]: ../ptrace/index.html
167
167
/// [`IoVec`]: struct.IoVec.html
168
168
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
169
- #[ cfg( all( target_os = "linux" , not( target_env = "uclibc" ) ) ) ]
169
+ #[ cfg( all( any ( target_os = "linux" , target_os = "android" ) , not( target_env = "uclibc" ) ) ) ]
170
170
pub fn process_vm_readv(
171
171
pid: crate :: unistd:: Pid ,
172
172
local_iov: & [ IoVec <& mut [ u8 ] >] ,
0 commit comments