Skip to content
Permalink
Browse files

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 #3758
  • Loading branch information...
MarcelRaad committed Apr 10, 2019
1 parent 20b8df1 commit dc0712eea3f4354e29330477bcf15b96f85e205c
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/server/util.c
@@ -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);

0 comments on commit dc0712e

Please sign in to comment.
You can’t perform that action at this time.