toolchain/musl: update to version 1.1.18
[openwrt/staging/chunkeey.git] / toolchain / musl / patches / 900-iconv_size_hack.patch
index 343915fb062baab2150b170d397b3253c75734c7..db18fceb17671dc91161dbbf49406897273ad26b 100644 (file)
@@ -32,7 +32,7 @@
  
  static int fuzzycmp(const unsigned char *a, const unsigned char *b)
  {
-@@ -216,6 +220,7 @@ size_t iconv(iconv_t cd0, char **restric
+@@ -224,6 +228,7 @@ size_t iconv(iconv_t cd0, char **restric
                                c = ((c-0xd7c0)<<10) + (d-0xdc00);
                        }
                        break;
                case SHIFT_JIS:
                        if (c-0xa1 <= 0xdf-0xa1) {
                                c += 0xff61-0xa1;
-@@ -362,6 +367,7 @@ size_t iconv(iconv_t cd0, char **restric
+@@ -370,6 +375,7 @@ size_t iconv(iconv_t cd0, char **restric
                        c = ksc[c][d];
                        if (!c) goto ilseq;
                        break;
 +#endif
                default:
                        if (c < 128+type) break;
-                       c -= 128+type;
+                       c = legacy_map(map, c);
 --- a/src/locale/codepages.h
 +++ b/src/locale/codepages.h
 @@ -118,6 +118,7 @@