void-packages/srcpkgs/lame/patches/translit.patch

27 lines
927 B
Diff

--- lame/frontend/parse.c 2023-04-20 18:12:43.988212890 +0200
+++ - 2023-04-20 18:13:39.537622345 +0200
@@ -232,7 +232,11 @@
dst = calloc(n+4, 4);
if (dst != 0) {
char* cur_code = nl_langinfo(CODESET);
+#ifdef __GLIBC__
iconv_t xiconv = iconv_open("ISO_8859-1//TRANSLIT", cur_code);
+#else
+ iconv_t xiconv = iconv_open("ISO_8859-1", cur_code);
+#endif
if (xiconv != (iconv_t)-1) {
char* i_ptr = (char*)src;
char* o_ptr = dst;
@@ -258,7 +262,11 @@
dst = calloc(n+4, 4);
if (dst != 0) {
char* cur_code = nl_langinfo(CODESET);
+#ifdef __GLIBC__
iconv_t xiconv = iconv_open("UTF-16LE//TRANSLIT", cur_code);
+#else
+ iconv_t xiconv = iconv_open("UTF-16LE", cur_code);
+#endif
dst[0] = 0xff;
dst[1] = 0xfe;
if (xiconv != (iconv_t)-1) {