diff options
author | fanquake <fanquake@gmail.com> | 2021-07-02 11:10:25 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-02-15 09:22:04 +0000 |
commit | c95b188fc08387d0a89668e56bce3a4fad1ee611 (patch) | |
tree | ca79160fbe22412d9f22d80cf56f7a9c6813c3b6 | |
parent | c1cdeddd905b5444eac330d565b297b3d4941c5d (diff) |
system: skip trying to set the locale on NetBSD
Just treat it the same as the other BSDs.
Fixes #17379.
Github-Pull: #22390
Rebased-From: fdd71448e78f442ffd93a3a3398a5062eaba9f1b
-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&) { |