[PATCH] fix tags for musl

Karel Balej via Lame-dev <[email protected]> Sat, 14 Oct 2023 08:21:46 +0200
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
Hello,

I attach a simple patch which fixes writing ID3 tags on musl and
probably also other non-glibc platforms.

The problem was that TRANSLIT is a glibc-specific iconv extension making
the call to iconv_open fail on musl and causing lame not to write the
tags at all (except for numeric ones if I recall correctly) without
indicating any error. This patch uses transliteration only when
__GNU_LIBRARY__ is defined which should be a reliable way to detect
glibc.

The patch was originally written for Void Linux [1] and it seems that it
has been adopted by at least Alpine [2] as well.

[1] https://github.com/void-linux/void-packages/pull/43550
[2] https://git.alpinelinux.org/aports/tree/main/lame/id3tagfix.patch

Best regards,
K. B.