Skip to content

Commit

Permalink
Move _WIN32_WINNT def into {c,cxx}flags
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jan 8, 2025
1 parent 9b81f60 commit a2ae406
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 0 additions & 12 deletions ci/rtools/BuildAwsCCommon.patch
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,3 @@ index 1204be0..0abd9cb 100644
return _byteswap_uint64(x);
#else
uint32_t low = x & UINT32_MAX;
diff --git a/source/windows/thread.c b/source/windows/thread.c
index 447fcd2..01e643f 100644
--- a/source/windows/thread.c
+++ b/source/windows/thread.c
@@ -10,6 +10,7 @@
#include <aws/common/private/thread_shared.h>
#include <aws/common/string.h>

+#define _WIN32_WINNT 0x0601
#include <Windows.h>

#include <inttypes.h>
6 changes: 6 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,12 @@ macro(build_awssdk)
string(APPEND AWS_C_FLAGS " -Wno-deprecated")
string(APPEND AWS_CXX_FLAGS " -Wno-deprecated")
endif()
# GH-44950: This is required to build under Rtools40 and we may be able to
# remove it if/when we no longer need to build under Rtools40
if(WIN32 AND NOT MSVC)
string(APPEND AWS_C_FLAGS " -D_WIN32_WINNT=0x0601")
string(APPEND AWS_CXX_FLAGS " -D_WIN32_WINNT=0x0601")
endif()

set(AWSSDK_COMMON_CMAKE_ARGS
${EP_COMMON_CMAKE_ARGS}
Expand Down

0 comments on commit a2ae406

Please sign in to comment.