From: Collin Funk Date: Fri, 24 Jan 2025 05:14:43 +0000 (-0800) Subject: char-h-c23: Fix compilation error on OmniOS. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=218917cf37d3c8fbf568946acdf2ffe5e10f488b;p=gnulib.git char-h-c23: Fix compilation error on OmniOS. * lib/lc-charset-unicode.c (locale_encoding_to_unicode) (unicode_to_locale_encoding): Cast the argument to iconv with ICONV_CONST. --- diff --git a/ChangeLog b/ChangeLog index 8c6b369348..359e50a4af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-01-23 Collin Funk + + char-h-c23: Fix compilation error on OmniOS. + * lib/lc-charset-unicode.c (locale_encoding_to_unicode) + (unicode_to_locale_encoding): Cast the argument to iconv with + ICONV_CONST. + 2025-01-23 Bruno Haible bootstrap: Make it work with module 'package-version'. diff --git a/lib/lc-charset-unicode.c b/lib/lc-charset-unicode.c index 9542873609..448619b687 100644 --- a/lib/lc-charset-unicode.c +++ b/lib/lc-charset-unicode.c @@ -175,7 +175,7 @@ locale_encoding_to_unicode (wchar_t wc) char *utf8ptr = utf8buf; size_t utf8size = sizeof (utf8buf); size_t ret = iconv (conv->cd_locale_to_utf8, - &mbptr, &mbsize, + (ICONV_CONST char **) &mbptr, &mbsize, &utf8ptr, &utf8size); if (ret == (size_t)(-1)) /* Conversion error. */ @@ -234,7 +234,7 @@ unicode_to_locale_encoding (char32_t uc) char *mbptr = mbbuf; size_t mbsize = sizeof (mbbuf); size_t ret = iconv (conv->cd_utf8_to_locale, - &utf8ptr, &utf8size, + (ICONV_CONST char **) &utf8ptr, &utf8size, &mbptr, &mbsize); if (ret == (size_t)(-1)) /* Conversion error. */