libcxx: fix OpenBSD build failure due to missing __get_locale_encoding()

https://github.com/llvm/llvm-project/pull/228306
This commit is contained in:
Alex Rønne Petersen committed 2026-10-07 00:30:52 +02:00
1 parent 709430de4b
commit 65f29a7344
1 file changed
+7
+7
View File
@@ -24,6 +24,9 @@
# include <wchar.h>
# include <wctype.h>
#endif
#if defined(_LIBCPP_BUILDING_LIBRARY)
# include <langinfo.h>
#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
//