From ceeb0fec9deeeb5326036c65c3860973cd934c68 Mon Sep 17 00:00:00 2001 From: Maarten de Vries Date: Wed, 20 Nov 2024 14:30:09 +0100 Subject: [PATCH] Expose len8_dlc field of can_frame struct on Linux (backport ) (cherry picked from commit 48bdb18dfb9db4e6d229c3620fa19993b35d0f10) --- src/unix/linux_like/linux/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 02a66960f56f..93dc33702a02 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1586,10 +1586,11 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct can_frame { pub can_id: canid_t, + // FIXME(1.0): this field was renamed to `len` in Linux 5.11 pub can_dlc: u8, __pad: u8, __res0: u8, - __res1: u8, + pub len8_dlc: u8, pub data: [u8; CAN_MAX_DLEN], }