Skip to content

Commit

Permalink
Fix building on MinGW: default WINVER is too old (#1681)
Browse files Browse the repository at this point in the history
MinGW defaults `WINVER` to something very old,
while benchmark requires features gated by `WINVER = 0x0600`,
so manually set update to that.
  • Loading branch information
zm1060 authored Oct 16, 2023
1 parent 682153a commit ea3c3f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 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

0 comments on commit ea3c3f9

Please sign in to comment.