diff --git a/ci/rtools/BuildAwsCCommon.patch b/ci/rtools/BuildAwsCCommon.patch index ab056e0055dca..f129b6f12344d 100644 --- a/ci/rtools/BuildAwsCCommon.patch +++ b/ci/rtools/BuildAwsCCommon.patch @@ -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 - #include - -+#define _WIN32_WINNT 0x0601 - #include - - #include diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 59a2db7b8198a..db208e89e3564 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -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}