diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-06-13 04:11:39 +0200 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-06-13 04:11:39 +0200 |
commit | 1cd2a89bd82a3c35dc4fd21d32211d8f81817050 (patch) | |
tree | ba0efbc21b8ce6590861403e1a95857624386b39 | |
parent | f1b4f562785d5b911bf1ab8181ca037db4d9d8af (diff) |
Fix implicit instantiation of undefined template
'std::char_traits<unsigned short>' on FreeBSD.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282329
-rw-r--r-- | indra/llcommon/llstring.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llstring.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 07adf71d18..bb6d091a97 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -260,7 +260,7 @@ S32 utf16str_wstring_length(const llutf16string &utf16str, const S32 utf16_len) { S32 surrogate_pairs = 0; // ... craziness to make gcc happy (llutf16string.c_str() is tweaked on linux): - const U16 *const utf16_chars = &(*(utf16str.begin())); + const auto *const utf16_chars = &(*(utf16str.begin())); S32 i = 0; while (i < utf16_len) { diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 7a8edc176d..2e579a4d2d 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -635,7 +635,11 @@ LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw); // // This typedef may or may not be identical to std::wstring, depending on // LL_WCHAR_T_NATIVE. +#if __FreeBSD__ +typedef std::basic_string<char16_t> llutf16string; +#else typedef std::basic_string<U16> llutf16string; +#endif // Considering wchar_t, llwchar and U16, there are three relevant cases: #if LLWCHAR_IS_WCHAR_T // every which way but Windows |