Common/CommonFuncs: Add StrErrorWrapper function

This commit is contained in:
Sepalani 2023-07-12 19:18:03 +04:00 committed by Nayla Hanegan
commit 592f215857
No known key found for this signature in database
GPG key ID: 3075216CED0DB01D
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();