Common/CommonFuncs: Add StrErrorWrapper function

This commit is contained in:
Sepalani
2023-07-12 19:18:03 +04:00
parent 7f40c6f2f8
commit 92be54d57a
2 changed files with 26 additions and 15 deletions

View File

@ -41,6 +41,9 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
namespace Common
{
// strerror_r wrapper to handle XSI and GNU versions.
const char* StrErrorWrapper(int error, char* buffer, std::size_t length);
// Wrapper function to get last strerror(errno) string.
// This function might change the error code.
std::string LastStrerrorString();