Skip to content

Commit 173943b

Browse files
committed
Force explicit struct packing
Signed-off-by: Keith Koskie <[email protected]>
1 parent 7252abb commit 173943b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cryptoki-sys/oasis-headers/pkcs11.h

+6
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ extern "C" {
187187
#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)
188188
#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)
189189

190+
// Save current pack setting and set packing to 1-byte alignment
191+
#pragma pack(push, 1)
192+
190193
/* All the various Cryptoki types and #define'd values are in the
191194
* file pkcs11t.h.
192195
*/
@@ -261,4 +264,7 @@ struct CK_FUNCTION_LIST {
261264
}
262265
#endif
263266

267+
// Restore prior pack setting
268+
#pragma pack(pop)
269+
264270
#endif /* _PKCS11_H_ */

0 commit comments

Comments
 (0)