From ed504cb22fcdea4d51a10dacdc6bf0a4eace3de8 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 17 Feb 2016 18:45:40 +0100 Subject: [PATCH] OpenSC.msi: fixed compilation with VS2015 WiX 3.10 uses `__vsnprintf` which is deprecated since VS2015 --- win32/customactions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32/customactions.cpp b/win32/customactions.cpp index 5da7ec91..ba1e6047 100644 --- a/win32/customactions.cpp +++ b/win32/customactions.cpp @@ -41,6 +41,12 @@ // WiX Header Files: #include +#if defined(_MSC_VER) && (_MSC_VER >= 1900) +// only for VS 2015 or later +// WiX 3.10 was built for older versions of VS and needs this for compatibility +#pragma comment(lib, "legacy_stdio_definitions.lib") +#endif + #define X86onX64_SC_DATABASE TEXT("SOFTWARE\\Wow6432Node\\Microsoft\\Cryptography\\Calais\\SmartCards") #define SC_DATABASE TEXT("SOFTWARE\\Microsoft\\Cryptography\\Calais\\SmartCards") #define BASE_CSP TEXT("OpenSC CSP")