We use __packed__ for all API structures so we can extend them without breaking alignment rules. We do try to explicitly align the structures, but to be safe we also use __packed__. uhid_feature_answer_req is already 64bit aligned so we can add __packed__ without breaking ABI.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -86,7 +86,7 @@ struct uhid_feature_answer_req { · 85 unmodified lines | |||
| 86 | __u16 err; | 86 | __u16 err; |
| 87 | __u16 size; | 87 | __u16 size; |
| 88 | __u8 data[UHID_DATA_MAX]; | 88 | __u8 data[UHID_DATA_MAX]; |
| 89 | }; | 89 | } __attribute__((__packed__)); |
| 90 | 90 | ||
| 91 | struct uhid_event { | 91 | struct uhid_event { |
| 92 | __u32 type; | 92 | __u32 type; |