common: fix use of snprintf on Windows
Refs: https://github.com/libuv/libuv/pull/467 PR-URL: https://github.com/libuv/libuv/pull/487 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
406961385d
commit
4c81d05112
@ -141,7 +141,11 @@ static const char* uv__unknown_err_code(int err) {
|
||||
char buf[32];
|
||||
char* copy;
|
||||
|
||||
#ifndef _WIN32
|
||||
snprintf(buf, sizeof(buf), "Unknown system error %d", err);
|
||||
#else
|
||||
_snprintf(buf, sizeof(buf), "Unknown system error %d", err);
|
||||
#endif
|
||||
copy = uv__strdup(buf);
|
||||
|
||||
return copy != NULL ? copy : "Unknown system error";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user