1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

tests/server/util: fix Windows Unicode build

Always use the ANSI version of FormatMessage as we don't have the
curl_multibyte gear available here.

Closes https://github.com/curl/curl/pull/3758
This commit is contained in:
Marcel Raad 2019-04-10 19:26:35 +02:00
parent 20b8df1096
commit dc0712eea3
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD

View File

@ -150,8 +150,8 @@ void win32_perror(const char *msg)
char buf[512];
DWORD err = SOCKERRNO;
if(!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, sizeof(buf), NULL))
if(!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, sizeof(buf), NULL))
msnprintf(buf, sizeof(buf), "Unknown error %lu (%#lx)", err, err);
if(msg)
fprintf(stderr, "%s: ", msg);