From: Marcel Raad Date: Wed, 10 Apr 2019 17:26:35 +0000 (+0200) Subject: tests/server/util: fix Windows Unicode build X-Git-Tag: curl-7_65_0~170 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc0712eea3f4354e29330477bcf15b96f85e205c;p=thirdparty%2Fcurl.git 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 --- diff --git a/tests/server/util.c b/tests/server/util.c index c3935f58ae..b061338022 100644 --- a/tests/server/util.c +++ b/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);