vcpkg/ports/glib/use-libiconv-on-windows.patch
hesham-essam 51b5543484
[glib]: bump version to 2.74.0 (#26949)
* [glib]: bump version to 2.74.0

* Disable gtkdocize for libmount

* restore git-tree

* update version

* Recommend installing libselinux1-dev to enable selinux support

Co-authored-by: Jonliu1993 <13720414433@163.com>
2022-10-13 11:20:24 -07:00

29 lines
752 B
Diff

diff --git a/glib/gconvert.c b/glib/gconvert.c
index 829fe38de..e01ad8884 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -32,7 +32,8 @@
#include <stdlib.h>
#ifdef G_OS_WIN32
-#include "win_iconv.c"
+#define USE_LIBICONV_GNU
+#include <iconv.h>
#endif
#ifdef G_PLATFORM_WIN32
diff --git a/meson.build b/meson.build
index d465253af..34ce69e4d 100644
--- a/meson.build
+++ b/meson.build
@@ -2038,7 +2038,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
if host_system == 'windows'
# We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
# any external library for it
- libiconv = []
+ libiconv = [cc.find_library('iconv')]
+ found_iconv = true
else
libiconv = dependency('iconv')
endif