Skip to content

gh-154048: Fix building the iconv codec on illumos/Solaris#154049

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:iconv-illumos-const
Jul 19, 2026
Merged

gh-154048: Fix building the iconv codec on illumos/Solaris#154049
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:iconv-illumos-const

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

iconv()'s input-buffer argument is declared const char ** on some systems (illumos/Solaris, old GNU libiconv) rather than the POSIX char **, so passing a char ** failed to compile — breaking the whole build on illumos, since it is a core object file.

Cast the argument through void *, which converts to either char ** or const char ** without a warning and needs no configure probe.

Verified: compiles on illumos (OpenIndiana, previously failing) and on Linux/glibc (no regression).

iconv()'s input-buffer argument is declared "const char **" on some systems
(illumos/Solaris, old GNU libiconv) rather than the POSIX "char **", so passing
a "char **" failed to compile.  Cast it through void*, which converts to either
without a warning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 19, 2026 06:01
@serhiy-storchaka
serhiy-storchaka merged commit 33df37d into python:main Jul 19, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant