From 005b0ce36788695898384f8e7e7a6a44cd0f3661 Mon Sep 17 00:00:00 2001 From: Daniel Gabay Date: Wed, 24 May 2023 19:07:04 +0300 Subject: [PATCH] defs: Enclose all structs between the pragmas Many of the STRUCT_PACKED structs are not within the pragmas resulting in wrong packing using MSVC. Fix it by moving pragma to EOF to ensure proper packing. Signed-off-by: Daniel Gabay --- src/common/ieee802_11_defs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 110f2b1e1..8cdf76bd4 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -1198,9 +1198,6 @@ struct ieee80211_ampe_ie { */ } STRUCT_PACKED; -#ifdef _MSC_VER -#pragma pack(pop) -#endif /* _MSC_VER */ #define ERP_INFO_NON_ERP_PRESENT BIT(0) #define ERP_INFO_USE_PROTECTION BIT(1) @@ -2933,4 +2930,8 @@ struct ieee80211_neighbor_ap_info { u8 data[0]; } STRUCT_PACKED; +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + #endif /* IEEE802_11_DEFS_H */