Skip to content

Commit 425d3ad

Browse files
committed
Fix windows build
windows.h defines min unless NOMINMAX is defined
1 parent 17c7600 commit 425d3ad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/stream/stream.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
#include <fcntl.h>
1919

2020
#ifdef _WIN32
21-
#include <windows.h>
22-
#include <io.h>
21+
#define NOMINMAX
22+
#include <windows.h>
23+
#include <io.h>
2324
#else
24-
#include <unistd.h>
25+
#include <unistd.h>
2526
#endif
2627

2728
void setStdinNonBlocking() {

0 commit comments

Comments
 (0)