]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
defs: Enclose all structs between the pragmas
authorDaniel Gabay <daniel.gabay@intel.com>
Wed, 24 May 2023 16:07:04 +0000 (19:07 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 3 Nov 2023 14:29:55 +0000 (16:29 +0200)
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 <daniel.gabay@intel.com>
src/common/ieee802_11_defs.h

index 110f2b1e1b8326be75eecbce8a9eb54fac9973ce..8cdf76bd488a2243e10b089851007a438a53e9d5 100644 (file)
@@ -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 */