From 8c04628d740135595be8ea9345ec7343fce95a9d Mon Sep 17 00:00:00 2001 From: codefenix-dev Date: Sun, 4 Oct 2026 10:50:13 -0400 Subject: [PATCH] Fix to ensure compatibility between DLLs built by different compilers Addresses Issue #7 --- include/OpenDoor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/OpenDoor.h b/include/OpenDoor.h index e848de6..0aa8854 100644 --- a/include/OpenDoor.h +++ b/include/OpenDoor.h @@ -673,9 +673,9 @@ typedef void(ODFAR OD_PERSONALITY_PROC)(BYTE); #pragma option -a- #endif /* __TURBOC__ >= 0x295 */ #endif /* __TURBOC__ */ -#ifdef _MSC_VER -#pragma pack(1) -#endif /* _MSC_VER */ +#if defined(_MSC_VER) || defined(__GNUC__) || defined(__clang__) +#pragma pack(push, 1) +#endif /* _MSC_VER || __GNUC__ || __clang__ */ #ifdef ODPLAT_DOS32 #pragma pack( __push, 1 ) #endif @@ -973,9 +973,9 @@ typedef struct } tODControl; /* Restore original structure alignment, if possible. */ -#ifdef _MSC_VER -#pragma pack() -#endif /* _MSC_VER */ +#if defined(_MSC_VER) || defined(__GNUC__) || defined(__clang__) +#pragma pack(pop) +#endif /* _MSC_VER || __GNUC__ || __clang__ */ #ifdef ODPLAT_DOS32 #pragma pack( __pop ) #endif