Skip to content

Commit 66500ee

Browse files
committed
Move structs to s_no_extra_traits
1 parent a39cf0d commit 66500ee

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/unix/linux_like/linux/align.rs

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,6 @@ macro_rules! expand_align {
5252
pub fd: ::c_int,
5353
pub pid: ::c_int,
5454
}
55-
56-
// linux/can.h
57-
#[repr(align(8))]
58-
pub struct can_frame {
59-
pub can_id: canid_t,
60-
pub can_dlc: u8,
61-
__pad: u8,
62-
__res0: u8,
63-
__res1: u8,
64-
pub data: [u8; CAN_MAX_DLEN],
65-
}
66-
67-
#[repr(align(8))]
68-
pub struct canfd_frame {
69-
pub can_id: canid_t,
70-
pub len: u8,
71-
pub flags: u8,
72-
__res0: u8,
73-
__res1: u8,
74-
pub data: [u8; CANFD_MAX_DLEN],
75-
}
7655
}
7756

7857
s_no_extra_traits! {
@@ -137,6 +116,29 @@ macro_rules! expand_align {
137116
pub struct pthread_rwlock_t {
138117
size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T],
139118
}
119+
120+
// linux/can.h
121+
#[repr(align(8))]
122+
#[allow(missing_debug_implementations)]
123+
pub struct can_frame {
124+
pub can_id: canid_t,
125+
pub can_dlc: u8,
126+
__pad: u8,
127+
__res0: u8,
128+
__res1: u8,
129+
pub data: [u8; CAN_MAX_DLEN],
130+
}
131+
132+
#[repr(align(8))]
133+
#[allow(missing_debug_implementations)]
134+
pub struct canfd_frame {
135+
pub can_id: canid_t,
136+
pub len: u8,
137+
pub flags: u8,
138+
__res0: u8,
139+
__res1: u8,
140+
pub data: [u8; CANFD_MAX_DLEN],
141+
}
140142
}
141143
};
142144
}

0 commit comments

Comments
 (0)