Skip to content

Commit

Permalink
system: skip trying to set the locale on NetBSD
Browse files Browse the repository at this point in the history
Just treat it the same as the other BSDs.

Fixes bitcoin#17379.

Github-Pull: bitcoin#22390
Rebased-From: fdd7144
  • Loading branch information
fanquake committed Feb 15, 2022
1 parent c1cdedd commit c95b188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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&) {
Expand Down

0 comments on commit c95b188

Please sign in to comment.