aboutsummaryrefslogtreecommitdiff
path: root/ports/libiconv/0003-Fix-uwp.patch
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-11-29 16:14:14 -0800
committerGitHub <noreply@github.com>2016-11-29 16:14:14 -0800
commitcb0d9e70a5f1bd88eb3e6c946ae3808518b8dac3 (patch)
treec878ad5b0f066f2b4a485b727ad466d665bb5fec /ports/libiconv/0003-Fix-uwp.patch
parentdaa47668d00d1534a913e8f81ac26c349fe5d2f9 (diff)
parent8ee0ec169919dc6c2e0379803a35f135d064dceb (diff)
downloadvcpkg-cb0d9e70a5f1bd88eb3e6c946ae3808518b8dac3.tar.gz
vcpkg-cb0d9e70a5f1bd88eb3e6c946ae3808518b8dac3.zip
Merge pull request #365 from stammen/uwp-libiconv
fix for uwp builds
Diffstat (limited to 'ports/libiconv/0003-Fix-uwp.patch')
-rw-r--r--ports/libiconv/0003-Fix-uwp.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/ports/libiconv/0003-Fix-uwp.patch b/ports/libiconv/0003-Fix-uwp.patch
new file mode 100644
index 000000000..0b2444166
--- /dev/null
+++ b/ports/libiconv/0003-Fix-uwp.patch
@@ -0,0 +1,25 @@
+diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c
+index 3aceb42..dadd95a 100644
+--- a/libcharset/lib/localcharset.c
++++ b/libcharset/lib/localcharset.c
+@@ -455,7 +455,10 @@ locale_charset (void)
+ # endif
+
+ #elif defined WIN32_NATIVE
+-
++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
++ // GetACP() not available to UWP apps
++ codeset = NULL;
++#else
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number:
+@@ -467,7 +470,7 @@ locale_charset (void)
+ encoding is the best bet. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+-
++#endif
+ #elif defined OS2
+
+ const char *locale;