diff --git a/ports/README.md b/ports/README.md index c68845807652..1fcf6fc9d130 100644 --- a/ports/README.md +++ b/ports/README.md @@ -32,6 +32,8 @@ For ease of review when patching existing ports, you are recommended to make one | Port | Reason | |---------------|------------------------------------------------------------------| +| `aws-c-io` | Patching to fix MinGW build failures. | +| `aws-sdk-cpp` | Patching to fix MinGW build failures. | | `libmagic` | Updating to the upstream port deferred due to failures. | | `openssl` | Pinning to OpenSSL 1.1 until we can move to 3.0 in January 2024. | | `libfaketime` | Port does not yet exist upstream | diff --git a/ports/aws-c-io/fix-pointer-mismatch.patch b/ports/aws-c-io/fix-pointer-mismatch.patch new file mode 100644 index 000000000000..474624554e29 --- /dev/null +++ b/ports/aws-c-io/fix-pointer-mismatch.patch @@ -0,0 +1,22 @@ +diff --git a/source/windows/secure_channel_tls_handler.c b/source/windows/secure_channel_tls_handler.c +index b62b1a0..48f4556 100644 +--- a/source/windows/secure_channel_tls_handler.c ++++ b/source/windows/secure_channel_tls_handler.c +@@ -53,7 +53,7 @@ struct secure_channel_ctx { + struct aws_tls_ctx ctx; + struct aws_string *alpn_list; + SCHANNEL_CRED credentials; +- PCERT_CONTEXT pcerts; ++ PCCERT_CONTEXT pcerts; + HCERTSTORE cert_store; + HCERTSTORE custom_trust_store; + HCRYPTPROV crypto_provider; +@@ -188,7 +188,7 @@ static int s_manually_verify_peer_cert(struct aws_channel_handler *handler) { + int result = AWS_OP_ERR; + CERT_CONTEXT *peer_certificate = NULL; + HCERTCHAINENGINE engine = NULL; +- CERT_CHAIN_CONTEXT *cert_chain_ctx = NULL; ++ PCCERT_CHAIN_CONTEXT cert_chain_ctx = NULL; + + /* get the peer's certificate so we can validate it.*/ + SECURITY_STATUS status = diff --git a/ports/aws-c-io/portfile.cmake b/ports/aws-c-io/portfile.cmake index 57624fc74b84..0d814d7398b1 100644 --- a/ports/aws-c-io/portfile.cmake +++ b/ports/aws-c-io/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF "v${VERSION}" SHA512 b5dc81635ce775c3783df2d4f6ccf0890b1e1669bddb1c10f6d200203684e84504ca87099cb88874010df28f98f658da5a4eacb9e4df0408d40d845f3d394f48 HEAD_REF master + PATCHES + "fix-pointer-mismatch.patch" ) vcpkg_cmake_configure( diff --git a/ports/aws-sdk-cpp/fix-winsock-headers.patch b/ports/aws-sdk-cpp/fix-winsock-headers.patch new file mode 100644 index 000000000000..37a6646eb9af --- /dev/null +++ b/ports/aws-sdk-cpp/fix-winsock-headers.patch @@ -0,0 +1,12 @@ +diff --git a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp +index b8ab519..7cd91e9 100644 +--- a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp ++++ b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp +@@ -19,6 +19,7 @@ + + #include + #include ++#include + #include // for tcp_keepalive + #include + #include diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index ddbaf2823eb8..6105d23792f8 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( lock-curl-http-and-tls-settings.patch fix_find_curl.patch find-dependency.patch + fix-winsock-headers.patch # In MinGW, mstcpip.h references types from headers it does not include itself. ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) diff --git a/ports/libmagic/0016-Remove-timespec-aliases.patch b/ports/libmagic/0016-Remove-timespec-aliases.patch new file mode 100644 index 000000000000..4252bd387345 --- /dev/null +++ b/ports/libmagic/0016-Remove-timespec-aliases.patch @@ -0,0 +1,16 @@ +diff --git a/src/cdf.h b/src/cdf.h +index 0505666..9645114 100644 +--- a/src/cdf.h ++++ b/src/cdf.h +@@ -35,11 +35,6 @@ + #ifndef _H_CDF_ + #define _H_CDF_ + +-#ifdef WIN32 +-#include +-#define timespec timeval +-#define tv_nsec tv_usec +-#endif + #ifdef __DJGPP__ + #define timespec timeval + #define tv_nsec tv_usec diff --git a/ports/libmagic/portfile.cmake b/ports/libmagic/portfile.cmake index c40c3e2bac64..6b0da75c2027 100644 --- a/ports/libmagic/portfile.cmake +++ b/ports/libmagic/portfile.cmake @@ -16,6 +16,7 @@ if(VCPKG_TARGET_IS_WINDOWS) "0011-Remove-pipe-related-functions-in-funcs.c.patch" "0014-Define-POSIX-macros-if-missing.patch" "0015-MSYS2-Remove-ioctl-call.patch" + "0016-Remove-timespec-aliases.patch" ) endif()