Skip to content

Commit

Permalink
fix: add winnt define
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Sep 30, 2023
1 parent 432e296 commit 80fc7d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"/WX"
],
"defines": [
"NOMINMAX"
"NOMINMAX",
"_WIN32_WINNT=0x0602"
],
"msvs_settings": {
"VCCLCompilerTool": {
Expand Down
4 changes: 0 additions & 4 deletions src/native_ext/util/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ int64_t HrTime() { return uv_hrtime(); }
#endif

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0600
#include <windows.h>
#include <sysinfoapi.h>
int64_t MicroSecondsSinceEpoch() {
FILETIME ft;
Expand All @@ -33,7 +30,6 @@ int64_t MicroSecondsSinceEpoch() {
t -= 116444736000000000LL;
return t / 10LL;
}
#undef WIN32_LEAN_AND_MEAN
#else
#include <time.h>
int64_t MicroSecondsSinceEpoch() {
Expand Down

0 comments on commit 80fc7d0

Please sign in to comment.