Fix for epoll on i686 redox
This commit is contained in:
@@ -8,6 +8,7 @@ cpp_compat = true
|
||||
[defines]
|
||||
"target_os=linux" = "__linux__"
|
||||
"target_os=redox" = "__redox__"
|
||||
"target_pointer_width=64" = "__LP64__"
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
|
||||
@@ -35,6 +35,7 @@ impl Default for epoll_data {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(target_os = "redox", target_pointer_width = "64"))]
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
// This will match in size with syscall::Event (24 bytes on 64-bit
|
||||
@@ -45,10 +46,17 @@ pub struct epoll_event {
|
||||
// 4 automatic alignment bytes
|
||||
pub data: epoll_data, // 8 bytes
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
pub _pad: u64, // 8 bytes
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "redox", target_pointer_width = "64")))]
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
pub struct epoll_event {
|
||||
pub events: u32,
|
||||
pub data: epoll_data,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn epoll_create(_size: c_int) -> c_int {
|
||||
epoll_create1(0)
|
||||
|
||||
Reference in New Issue
Block a user