From 5650b2ef37546aca626da078a0aa20963a314824 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Wed, 15 Oct 2025 18:48:43 -0500 Subject: [PATCH] StringUtil: Replace strerror with Common::LastStrerrorString. --- Source/Core/Common/StringUtil.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 326a8e19eb2..bea9ac5d9d9 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -22,6 +22,7 @@ #include #include +#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/Logging/Log.h" @@ -31,7 +32,6 @@ constexpr u32 CODEPAGE_SHIFT_JIS = 932; constexpr u32 CODEPAGE_WINDOWS_1252 = 1252; -#include "Common/CommonFuncs.h" #include "Common/Swap.h" #else #include @@ -489,7 +489,8 @@ static std::string CodeTo(const char* tocode, const char* fromcode, std::basic_s auto* const conv_desc = iconv_open(tocode, fromcode); if ((iconv_t)-1 == conv_desc) { - ERROR_LOG_FMT(COMMON, "Iconv initialization failure [{}]: {}", fromcode, strerror(errno)); + ERROR_LOG_FMT(COMMON, "Iconv initialization failure [{}]: {}", fromcode, + Common::LastStrerrorString()); } else { @@ -522,7 +523,7 @@ static std::string CodeTo(const char* tocode, const char* fromcode, std::basic_s } else { - ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, strerror(errno)); + ERROR_LOG_FMT(COMMON, "iconv failure [{}]: {}", fromcode, Common::LastStrerrorString()); break; } }