From 5739866ec2ac5137732141e9984e5498f387a39c Mon Sep 17 00:00:00 2001 From: Florin T Date: Tue, 7 Jun 2022 02:06:12 -0700 Subject: [PATCH] fix: Fix build for MSVC (#1078) For Windows the order of the includes is important in wincompat.hpp. (cherry picked from commit 375d566635a934ba22287c391f39e58e85aa8567) --- src/core/wincompat.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/wincompat.hpp b/src/core/wincompat.hpp index e550593cb..20827109f 100644 --- a/src/core/wincompat.hpp +++ b/src/core/wincompat.hpp @@ -75,9 +75,13 @@ const mode_t S_IWUSR = mode_t(_S_IWRITE); # define NOMINMAX 1 # define WIN32_NO_STATUS // clang-format off +# include // struct timeval +// windows must be included after winsock2 +// https://stackoverflow.com/questions/1372480/c-redefinition-header-files-winsock2-h # include +// bccrypt must go after windows.h +// https://stackoverflow.com/questions/57472787/compile-errors-when-using-c-and-bcrypt-header # include // NTSTATUS -# include // struct timeval // clang-format on # undef WIN32_NO_STATUS # include -- 2.47.2