vcpkg/ports/xmlsec/0001-uwp-fix.patch
SvenPStarFinanz 15c59be137 [xmlsec] Add a new port (#7168) (#7196)
* [xmlsec] Add a new port (#7168)

* [xmlsec] Fix missing iconv on x64-osx
2019-07-09 15:46:45 -04:00

21 lines
705 B
Diff

diff --git a/src/dl.c b/src/dl.c
index b13f9d4..4a1b0c1 100644
--- a/src/dl.c
+++ b/src/dl.c
@@ -148,7 +148,14 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
#endif /* XMLSEC_DL_LIBLTDL */
#ifdef XMLSEC_DL_WIN32
- lib->handle = LoadLibraryA((char*)lib->filename);
+#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
+ lib->handle = LoadLibraryA((char*)lib->filename);
+#else
+ LPTSTR wcLib = NULL;
+ wcLib = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename);
+ if (wcLib)
+ lib->handle = LoadPackagedLibrary(wcLib, 0);
+#endif
if(lib->handle == NULL) {
xmlSecIOError("LoadLibraryA", lib->filename, NULL);
xmlSecCryptoDLLibraryDestroy(lib);