From 515f1839a8f7cda2fbf05b47b5be765ed18d21c5 Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Thu, 29 Aug 2024 19:22:00 -0400 Subject: [PATCH] Windows: Fix build issue with newer Visual Studio Encountered this error after updates to Visual Studio. 5>rarpch.cpp 5>c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winnt.h(2535): error C2338: Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined. It seems that libclamunrar VS project file was set to 4-byte struct member alignment. Changing this to "Default" fixes the issue. --- win32/libclamunrar.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win32/libclamunrar.vcxproj b/win32/libclamunrar.vcxproj index 89860990fa..c0771f344c 100644 --- a/win32/libclamunrar.vcxproj +++ b/win32/libclamunrar.vcxproj @@ -100,7 +100,7 @@ Sync EnableFastChecks MultiThreadedDebug - 4Bytes + Default false Use rar.hpp @@ -131,7 +131,7 @@ Sync EnableFastChecks MultiThreadedDebug - 4Bytes + Default false Use rar.hpp @@ -162,7 +162,7 @@ false Sync MultiThreadedDebug - 4Bytes + Default true true NoExtensions @@ -204,7 +204,7 @@ false Sync MultiThreadedDebug - 4Bytes + Default true true false