Skip to content

Commit

Permalink
can_frame and canfd_frame are available only with libc_align
Browse files Browse the repository at this point in the history
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
  • Loading branch information
djarek committed Dec 30, 2020
1 parent 4a7ec45 commit ba49dee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -510,6 +510,7 @@ s! {
}

// linux/can.h
#[cfg(libc_align)]
#[repr(align(8))]
pub struct can_frame {
pub can_id: canid_t,
Expand All @@ -520,6 +521,7 @@ s! {
pub data: [u8; CAN_MAX_DLEN],
}

#[cfg(libc_align)]
#[repr(align(8))]
pub struct canfd_frame {
pub can_id: canid_t,
Expand Down

0 comments on commit ba49dee

Please sign in to comment.