mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 23:19:16 +08:00
15c59be137
* [xmlsec] Add a new port (#7168) * [xmlsec] Fix missing iconv on x64-osx
21 lines
705 B
Diff
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);
|