From: Florin T Date: Tue, 7 Jun 2022 09:06:12 +0000 (-0700) Subject: fix: Fix build for MSVC (#1078) X-Git-Tag: v4.6.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5739866ec2ac5137732141e9984e5498f387a39c;p=thirdparty%2Fccache.git fix: Fix build for MSVC (#1078) For Windows the order of the includes is important in wincompat.hpp. (cherry picked from commit 375d566635a934ba22287c391f39e58e85aa8567) --- 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