Skip to content
Snippets Groups Projects
Verified Commit 04d2f296 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix for epoll on i686 redox

parent 9a7dfc4f
No related branches found
No related tags found
No related merge requests found
Pipeline #11402 passed
...@@ -8,6 +8,7 @@ cpp_compat = true ...@@ -8,6 +8,7 @@ cpp_compat = true
[defines] [defines]
"target_os=linux" = "__linux__" "target_os=linux" = "__linux__"
"target_os=redox" = "__redox__" "target_os=redox" = "__redox__"
"target_pointer_width=64" = "__LP64__"
[enum] [enum]
prefix_with_name = true prefix_with_name = true
...@@ -35,6 +35,7 @@ impl Default for epoll_data { ...@@ -35,6 +35,7 @@ impl Default for epoll_data {
} }
} }
#[cfg(all(target_os = "redox", target_pointer_width = "64"))]
#[repr(C)] #[repr(C)]
#[derive(Clone, Copy, Default)] #[derive(Clone, Copy, Default)]
// This will match in size with syscall::Event (24 bytes on 64-bit // This will match in size with syscall::Event (24 bytes on 64-bit
...@@ -45,10 +46,17 @@ pub struct epoll_event { ...@@ -45,10 +46,17 @@ pub struct epoll_event {
// 4 automatic alignment bytes // 4 automatic alignment bytes
pub data: epoll_data, // 8 bytes pub data: epoll_data, // 8 bytes
#[cfg(target_os = "redox")]
pub _pad: u64, // 8 bytes 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] #[no_mangle]
pub extern "C" fn epoll_create(_size: c_int) -> c_int { pub extern "C" fn epoll_create(_size: c_int) -> c_int {
epoll_create1(0) epoll_create1(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment