mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-10-28 10:45:48 +08:00
libcxx: fix OpenBSD build failure due to missing __get_locale_encoding()
https://github.com/llvm/llvm-project/pull/228306
This commit is contained in:
1 file changed
+7
@@ -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
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user