Skip to content

Commit

Permalink
[UTIL] Make sure Windows.h doesn't define min
Browse files Browse the repository at this point in the history
Define `NOMINMAX` before including Windows.h to fix the building in
intel/llvm#12375.
  • Loading branch information
kbenzie committed Jan 17, 2024
1 parent 5d58871 commit 46acd71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/common/ur_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#include <vector>

#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
inline int ur_getpid(void) { return static_cast<int>(GetCurrentProcessId()); }
#else
Expand Down

0 comments on commit 46acd71

Please sign in to comment.