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> {
7070 }
7171}
7272
73- #[ cfg( linux_kernel) ]
73+ #[ cfg( any ( linux_kernel, all ( target_os = "redox" , feature = "event" ) ) ) ]
7474#[ inline]
7575pub ( super ) fn ret_u32 ( raw : c:: c_int ) -> io:: Result < u32 > {
7676 if raw == -1 {
Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ pub fn add(
197197 as_mut_ptr ( & mut Event {
198198 flags : event_flags,
199199 data,
200+ #[ cfg( target_os = "redox" ) ]
201+ _pad : 0 ,
200202 } )
201203 . cast ( ) ,
202204 ) )
@@ -228,6 +230,8 @@ pub fn modify(
228230 as_mut_ptr ( & mut Event {
229231 flags : event_flags,
230232 data,
233+ #[ cfg( target_os = "redox" ) ]
234+ _pad : 0 ,
231235 } )
232236 . cast ( ) ,
233237 ) )
@@ -295,13 +299,16 @@ impl<'a> Iterator for Iter<'a> {
295299/// A record of an event that occurred.
296300#[ repr( C ) ]
297301#[ 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+ )
305312 ) ,
306313 repr( packed)
307314) ]
@@ -311,6 +318,9 @@ pub struct Event {
311318 pub flags : EventFlags ,
312319 /// User data.
313320 pub data : EventData ,
321+
322+ #[ cfg( target_os = "redox" ) ]
323+ _pad : u64 ,
314324}
315325
316326/// 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;
55#[ cfg_attr( windows, path = "windows_syscalls.rs" ) ]
66pub ( crate ) mod syscalls;
77
8- #[ cfg( linux_kernel) ]
8+ #[ cfg( any ( linux_kernel, target_os = "redox" ) ) ]
99pub mod epoll;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ mod poll;
1515#[ cfg( solarish) ]
1616pub mod port;
1717
18- #[ cfg( linux_kernel) ]
18+ #[ cfg( any ( linux_kernel, target_os = "redox" ) ) ]
1919pub use crate :: backend:: event:: epoll;
2020#[ cfg( any(
2121 linux_kernel,
You can’t perform that action at this time.
0 commit comments