Skip to content

Commit

Permalink
fix ci windows
Browse files Browse the repository at this point in the history
  • Loading branch information
uchenily committed May 16, 2024
1 parent 6df1bfe commit 5d27496
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 2 additions & 5 deletions uvio/core.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#pragma once

#if !defined(NOMINMAX) && defined(_WIN32)
// https://github.com/randombit/botan/issues/1852
#define NOMINMAX 1
#include <windows.h>
#endif
// first
#include "uvio/platform.hpp"

#include "uvio/coroutine/task.hpp"
#include "uvio/macros.hpp"
Expand Down
7 changes: 2 additions & 5 deletions uvio/coroutine/task.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#pragma once

#if !defined(NOMINMAX) && defined(_WIN32)
// https://github.com/randombit/botan/issues/1852
#define NOMINMAX 1
#include <windows.h>
#endif
// first
#include "uvio/platform.hpp"

#include "uvio/debug.hpp"

Expand Down
9 changes: 9 additions & 0 deletions uvio/platform.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#pragma once

// define NOMINMAX in front of windows.h
#if !defined(NOMINMAX) && defined(_WIN32)
// https://github.com/randombit/botan/issues/1852
#define NOMINMAX 1
#endif

#if defined(_WIN32)
// winsock2.h in front of windows.h
#include <winsock2.h>

#include <windows.h>
#else
#include <netinet/in.h>
#include <sys/socket.h>
Expand Down

0 comments on commit 5d27496

Please sign in to comment.