Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libiconv] Fix 'DLL Initialization Failed' in UWP applications #19108

Merged
merged 2 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/libiconv/0004-ModuleFileName.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/relocatable.c b/lib/relocatable.c
index 89b6c27..1561894 100644
--- a/lib/relocatable.c
+++ b/lib/relocatable.c
@@ -329,7 +329,7 @@ DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
/* The DLL is being loaded into an application's address range. */
static char location[MAX_PATH];

- if (!GetModuleFileName (module_handle, location, sizeof (location)))
+ if (!GetModuleFileNameA (module_handle, location, sizeof (location)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this may not be an upstream fix, I think we can still accept it.

/* Shouldn't happen. */
return FALSE;

2 changes: 1 addition & 1 deletion ports/libiconv/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libiconv
Version: 1.16
Port-Version: 8
Port-Version: 9
Homepage: https://www.gnu.org/software/libiconv/
Description: GNU Unicode text conversion
1 change: 1 addition & 0 deletions ports/libiconv/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ vcpkg_extract_source_archive_ex(
PATCHES
0002-Config-for-MSVC.patch
0003-Add-export.patch
0004-ModuleFileName.patch
)

if (NOT VCPKG_TARGET_IS_ANDROID)
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@
},
"libiconv": {
"baseline": "1.16",
"port-version": 8
"port-version": 9
},
"libics": {
"baseline": "1.6.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libiconv.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1350957315a151eb58fa91c61c3fa754126135a1",
"version-string": "1.16",
"port-version": 9
},
{
"git-tree": "1190548d712c0ed8699e3b82e16f6b070a5154c9",
"version-string": "1.16",
Expand Down