aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-07-02 11:10:25 +0800
committerfanquake <fanquake@gmail.com>2022-02-15 09:22:04 +0000
commitc95b188fc08387d0a89668e56bce3a4fad1ee611 (patch)
treeca79160fbe22412d9f22d80cf56f7a9c6813c3b6
parentc1cdeddd905b5444eac330d565b297b3d4941c5d (diff)
downloadbitcoin-c95b188fc08387d0a89668e56bce3a4fad1ee611.tar.xz
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.cpp2
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&) {