diff options
author | fanquake <fanquake@gmail.com> | 2021-07-02 11:10:25 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-07-02 11:10:25 +0800 |
commit | fdd71448e78f442ffd93a3a3398a5062eaba9f1b (patch) | |
tree | e53b93a3742c49c2d1b1d02f7878021253b7ab0c /src | |
parent | ddc6979b8baab048bbf0c5c2dd23345a8eb5c60e (diff) |
system: skip trying to set the locale on NetBSD
Just treat it the same as the other BSDs.
Fixes #17379.
Diffstat (limited to 'src')
-rw-r--r-- | src/util/system.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 258ba2f235..65c16fcd97 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -1301,7 +1301,7 @@ void SetupEnvironment() #endif // On most POSIX systems (e.g. Linux, but not BSD) the environment's locale // may be invalid, in which case the "C.UTF-8" locale is used as fallback. -#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) try { std::locale(""); // Raises a runtime error if current locale is invalid } catch (const std::runtime_error&) { |