Skip to content

Commit 4c49925

Browse files
committed
Account for compilers that support #pragma pack as well
1 parent e7e1292 commit 4c49925

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/atcacert/atcacert_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ typedef struct ATCA_PACKED atcacert_cert_element_s
166166
atcacert_transform_t transforms[ATCA_MAX_TRANSFORMS]; //!< List of transforms from device to cert for this element.
167167
} atcacert_cert_element_t;
168168

169+
#ifndef ATCA_NO_PRAGMA_PACK
170+
#pragma pack(pop)
171+
#endif
172+
169173
/**
170174
* Defines a certificate and all the pieces to work with it.
171175
*
@@ -208,10 +212,6 @@ typedef struct atcacert_build_state_s
208212
uint8_t device_sn[9]; //!< Storage for the device SN, when it's found.
209213
} atcacert_build_state_t;
210214

211-
#ifndef ATCA_NO_PRAGMA_PACK
212-
#pragma pack(pop)
213-
#endif
214-
215215
// Inform function naming when compiling in C++
216216
#ifdef __cplusplus
217217
extern "C" {

0 commit comments

Comments
 (0)