From 08f756bd370c3e100b186c7e24bef6a033575b29 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:19:45 +0100 Subject: [PATCH] Replace locale-dependent `std::strerror` with `SysErrorString` --- src/util/subprocess.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/subprocess.h b/src/util/subprocess.h index 4a85ae92687..4acfa8ff831 100644 --- a/src/util/subprocess.h +++ b/src/util/subprocess.h @@ -36,6 +36,8 @@ Documentation for C++ subprocessing library. #ifndef BITCOIN_UTIL_SUBPROCESS_H #define BITCOIN_UTIL_SUBPROCESS_H +#include + #include #include #include @@ -150,7 +152,7 @@ class OSError: public std::runtime_error { public: OSError(const std::string& err_msg, int err_code): - std::runtime_error( err_msg + ": " + std::strerror(err_code) ) + std::runtime_error(err_msg + ": " + SysErrorString(err_code)) {} };