diff --git a/lib/libcxx/include/__locale_dir/support/openbsd.h b/lib/libcxx/include/__locale_dir/support/openbsd.h index 0ec5b12f2ebdde33772c303d0390d9f9dfa053f5..1fcae994b3aaef3e012397412b3ed8a5f49817fa 100644 --- a/lib/libcxx/include/__locale_dir/support/openbsd.h +++ b/lib/libcxx/include/__locale_dir/support/openbsd.h @@ -24,6 +24,9 @@ # include # include #endif +#if defined(_LIBCPP_BUILDING_LIBRARY) +# include +#endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -74,6 +77,10 @@ inline __lconv_t* __localeconv(__locale_t& __loc) { __locale_guard __current(__loc); return ::localeconv(); } + +inline _LIBCPP_HIDE_FROM_ABI const char* __get_locale_encoding(__locale_t __loc) { + return ::nl_langinfo_l(CODESET, __loc); +} #endif // _LIBCPP_BUILDING_LIBRARY //