diff --git a/lib/libc/locale/c16rtomb.c b/lib/libc/locale/c16rtomb.c index 6f86b0074667..46b930786592 100644 --- a/lib/libc/locale/c16rtomb.c +++ b/lib/libc/locale/c16rtomb.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "xlocale_private.h" +#include "mblocal.h" typedef struct { char16_t lead_surrogate; @@ -47,7 +47,7 @@ c16rtomb_l(char * __restrict s, char16_t c16, mbstate_t * __restrict ps, FIX_LOCALE(locale); if (ps == NULL) - ps = &locale->c16rtomb; + ps = &(XLOCALE_CTYPE(locale)->c16rtomb); cs = (_Char16State *)ps; /* If s is a null pointer, the value of parameter c16 is ignored. */ diff --git a/lib/libc/locale/c32rtomb.c b/lib/libc/locale/c32rtomb.c index 31d7a280deda..ebd671a404cc 100644 --- a/lib/libc/locale/c32rtomb.c +++ b/lib/libc/locale/c32rtomb.c @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "xlocale_private.h" +#include "mblocal.h" size_t c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps, @@ -47,7 +47,7 @@ c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps, FIX_LOCALE(locale); if (ps == NULL) - ps = &locale->c32rtomb; + ps = &(XLOCALE_CTYPE(locale)->c32rtomb); /* Assume wchar_t uses UTF-32. */ return (wcrtomb_l(s, c32, ps, locale)); diff --git a/lib/libc/locale/mbrtoc16.c b/lib/libc/locale/mbrtoc16.c index 497f1cd028d0..7f5674d97d3c 100644 --- a/lib/libc/locale/mbrtoc16.c +++ b/lib/libc/locale/mbrtoc16.c @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #include -#include "xlocale_private.h" +#include "mblocal.h" typedef struct { char16_t trail_surrogate; @@ -47,7 +47,7 @@ mbrtoc16_l(char16_t * __restrict pc16, const char * __restrict s, size_t n, FIX_LOCALE(locale); if (ps == NULL) - ps = &locale->mbrtoc16; + ps = &(XLOCALE_CTYPE(locale)->mbrtoc16); cs = (_Char16State *)ps; /* diff --git a/lib/libc/locale/mbrtoc32.c b/lib/libc/locale/mbrtoc32.c index d1d8102e16f9..1238ca228b20 100644 --- a/lib/libc/locale/mbrtoc32.c +++ b/lib/libc/locale/mbrtoc32.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "xlocale_private.h" +#include "mblocal.h" size_t mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n, @@ -40,7 +40,7 @@ mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n, FIX_LOCALE(locale); if (ps == NULL) - ps = &locale->mbrtoc32; + ps = &(XLOCALE_CTYPE(locale)->mbrtoc32); /* Assume wchar_t uses UTF-32. */ return (mbrtowc_l(pc32, s, n, ps, locale));