File tree Expand file tree Collapse file tree 4 files changed +20
-10
lines changed Expand file tree Collapse file tree 4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ pub(super) fn ret_c_int(raw: c::c_int) -> io::Result<c::c_int> {
70
70
}
71
71
}
72
72
73
- #[ cfg( linux_kernel) ]
73
+ #[ cfg( any ( linux_kernel, all ( target_os = "redox" , feature = "event" ) ) ) ]
74
74
#[ inline]
75
75
pub ( super ) fn ret_u32 ( raw : c:: c_int ) -> io:: Result < u32 > {
76
76
if raw == -1 {
Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ pub fn add(
197
197
as_mut_ptr ( & mut Event {
198
198
flags : event_flags,
199
199
data,
200
+ #[ cfg( target_os = "redox" ) ]
201
+ _pad : 0 ,
200
202
} )
201
203
. cast ( ) ,
202
204
) )
@@ -228,6 +230,8 @@ pub fn modify(
228
230
as_mut_ptr ( & mut Event {
229
231
flags : event_flags,
230
232
data,
233
+ #[ cfg( target_os = "redox" ) ]
234
+ _pad : 0 ,
231
235
} )
232
236
. cast ( ) ,
233
237
) )
@@ -295,13 +299,16 @@ impl<'a> Iterator for Iter<'a> {
295
299
/// A record of an event that occurred.
296
300
#[ repr( C ) ]
297
301
#[ cfg_attr(
298
- any(
299
- all(
300
- target_arch = "x86" ,
301
- not( target_env = "musl" ) ,
302
- not( target_os = "android" ) ,
303
- ) ,
304
- target_arch = "x86_64" ,
302
+ all(
303
+ linux_kernel,
304
+ any(
305
+ all(
306
+ target_arch = "x86" ,
307
+ not( target_env = "musl" ) ,
308
+ not( target_os = "android" ) ,
309
+ ) ,
310
+ target_arch = "x86_64" ,
311
+ )
305
312
) ,
306
313
repr( packed)
307
314
) ]
@@ -311,6 +318,9 @@ pub struct Event {
311
318
pub flags : EventFlags ,
312
319
/// User data.
313
320
pub data : EventData ,
321
+
322
+ #[ cfg( target_os = "redox" ) ]
323
+ _pad : u64 ,
314
324
}
315
325
316
326
/// Data associated with an [`Event`]. This can either be a 64-bit integer
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ pub(crate) mod types;
5
5
#[ cfg_attr( windows, path = "windows_syscalls.rs" ) ]
6
6
pub ( crate ) mod syscalls;
7
7
8
- #[ cfg( linux_kernel) ]
8
+ #[ cfg( any ( linux_kernel, target_os = "redox" ) ) ]
9
9
pub mod epoll;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ mod poll;
15
15
#[ cfg( solarish) ]
16
16
pub mod port;
17
17
18
- #[ cfg( linux_kernel) ]
18
+ #[ cfg( any ( linux_kernel, target_os = "redox" ) ) ]
19
19
pub use crate :: backend:: event:: epoll;
20
20
#[ cfg( any(
21
21
linux_kernel,
You can’t perform that action at this time.
0 commit comments