Skip to content

Commit

Permalink
Fix error: 'WC_ERR_INVALID_CHARS' was not declared in this scope
Browse files Browse the repository at this point in the history
  • Loading branch information
zm1060 committed Oct 16, 2023
1 parent 96fb38c commit cb3330d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sysinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include "internal_macros.h"

#ifdef BENCHMARK_OS_WINDOWS
#if !defined(WINVER) || WINVER < 0x0600
#undef WINVER
#define WINVER 0x0600
#endif // WINVER handling
#include <shlwapi.h>
#undef StrCat // Don't let StrCat in string_util.h be renamed to lstrcatA
#include <versionhelpers.h>
Expand Down Expand Up @@ -428,9 +432,6 @@ std::string GetSystemName() {
#ifndef UNICODE
str = std::string(hostname, DWCOUNT);
#else
#ifndef WC_ERR_INVALID_CHARS
#define WC_ERR_INVALID_CHARS 0x00000080
#endif
// `WideCharToMultiByte` returns `0` when conversion fails.
int len = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, hostname,
DWCOUNT, NULL, 0, NULL, NULL);
Expand Down

0 comments on commit cb3330d

Please sign in to comment.