configure: use -fpack-struct instead of pragmas
Use -fpack-struct compiler option instead of pragmas in the code.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
diff --git a/configure.ac b/configure.ac
index ac1e601..8b0e4ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,7 @@
AX_ADD_COMPILER_FLAG([-fstack-protector-all])
AX_ADD_COMPILER_FLAG([-fpic])
AX_ADD_COMPILER_FLAG([-fPIC])
+AX_ADD_COMPILER_FLAG([-fpack-struct])
AX_ADD_PREPROC_FLAG([-U_FORTIFY_SOURCE])
AX_ADD_PREPROC_FLAG([-D_FORTIFY_SOURCE=2])
AX_ADD_LINK_FLAG([-Wl,--no-undefined])
diff --git a/sysapi/include/sysapi_util.h b/sysapi/include/sysapi_util.h
index 9e71206..396cc10 100644
--- a/sysapi/include/sysapi_util.h
+++ b/sysapi/include/sysapi_util.h
@@ -103,7 +103,6 @@
#define SYS_CONTEXT ( (_TSS2_SYS_CONTEXT_BLOB *)sysContext )
-#pragma pack(push, 1)
//
// Generic header
//
@@ -126,8 +125,6 @@
UINT32 responseCode;
} TPM20_ErrorResponse;
-#pragma pack(pop)
-
typedef struct {
TPM_CC commandCode;
int numCommandHandles; // Num of handles that require authorization in