@@ -120,7 +120,7 @@ pub fn pipe() -> io::Result<(Sender, Receiver)> {
120
120
/// ```
121
121
#[ derive( Clone , Debug ) ]
122
122
pub struct OpenOptions {
123
- #[ cfg( target_os = "linux" ) ]
123
+ #[ cfg( any ( target_os = "linux" , target_os = "android" ) ) ]
124
124
read_write : bool ,
125
125
unchecked : bool ,
126
126
}
@@ -131,7 +131,7 @@ impl OpenOptions {
131
131
/// All options are initially set to `false`.
132
132
pub fn new ( ) -> OpenOptions {
133
133
OpenOptions {
134
- #[ cfg( target_os = "linux" ) ]
134
+ #[ cfg( any ( target_os = "linux" , target_os = "android" ) ) ]
135
135
read_write : false ,
136
136
unchecked : false ,
137
137
}
@@ -168,8 +168,8 @@ impl OpenOptions {
168
168
/// .read_write(true)
169
169
/// .open_receiver("path/to/a/fifo");
170
170
/// ```
171
- #[ cfg( target_os = "linux" ) ]
172
- #[ cfg_attr( docsrs, doc( cfg( target_os = "linux" ) ) ) ]
171
+ #[ cfg( any ( target_os = "linux" , target_os = "android" ) ) ]
172
+ #[ cfg_attr( docsrs, doc( cfg( any ( target_os = "linux" , target_os = "android" ) ) ) ) ]
173
173
pub fn read_write ( & mut self , value : bool ) -> & mut Self {
174
174
self . read_write = value;
175
175
self
@@ -264,7 +264,7 @@ impl OpenOptions {
264
264
. write ( pipe_end == PipeEnd :: Sender )
265
265
. custom_flags ( libc:: O_NONBLOCK ) ;
266
266
267
- #[ cfg( target_os = "linux" ) ]
267
+ #[ cfg( any ( target_os = "linux" , target_os = "android" ) ) ]
268
268
if self . read_write {
269
269
options. read ( true ) . write ( true ) ;
270
270
}
0 commit comments