mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[Support] Fix StrError on Windows to actually return the error string...
llvm-svn: 167191
This commit is contained in:
parent
4498c89d5f
commit
cfb51565fa
@ -53,8 +53,10 @@ std::string StrError(int errnum) {
|
||||
str = buffer;
|
||||
# endif
|
||||
#elif HAVE_DECL_STRERROR_S // "Windows Secure API"
|
||||
if (errnum)
|
||||
if (errnum) {
|
||||
strerror_s(buffer, MaxErrStrLen - 1, errnum);
|
||||
str = buffer;
|
||||
}
|
||||
#elif defined(HAVE_STRERROR)
|
||||
// Copy the thread un-safe result of strerror into
|
||||
// the buffer as fast as possible to minimize impact
|
||||
|
Loading…
Reference in New Issue
Block a user