Skip to content

Commit 29769bd

Browse files
authored
Merge pull request swiftlang#37150 from fredriss/fix-windows-build
Fix Windows build
2 parents 6d37167 + 28a23e5 commit 29769bd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717

1818
#include "swift/Runtime/Concurrency.h"
1919

20+
#ifdef _WIN32
21+
// On Windows, an include below triggers an indirect include of minwindef.h
22+
// which contains a definition of the `max` macro, generating an error in our
23+
// use of std::max in this file. This define prevents those macros from being
24+
// defined.
25+
#define NOMINMAX
26+
#endif
27+
2028
#include "../CompatibilityOverride/CompatibilityOverride.h"
2129
#include "../runtime/ThreadLocalStorage.h"
2230
#include "swift/Runtime/Atomic.h"

0 commit comments

Comments
 (0)