--- src/port/chklocale.c +++ src/port/chklocale.c @@ -211,7 +211,7 @@ { r = malloc(16); /* excess */ if (r != NULL) - sprintf(r, "CP%u", loct->locinfo->lc_codepage); + sprintf(r, "CP%u", ((struct __crt_locale_data_public *) loct->locinfo)->_locale_lc_codepage); _free_locale(loct); } #else