--- a/vendor/boringssl/include/openssl/target.h
+++ b/vendor/boringssl/include/openssl/target.h
@@ -78,8 +78,13 @@
 #define OPENSSL_APPLE
 #endif
 
+// Unfortunate workaround to avoid symbol conflict with wincrypt.h
+// See https://github.com/openssl/openssl/issues/9981
 #if defined(_WIN32)
 #define OPENSSL_WINDOWS
+#undef PKCS7_SIGNER_INFO
+#undef X509_EXTENSIONS
+#undef X509_NAME
 #endif
 
 // Trusty and Android baremetal aren't Linux but currently define __linux__.
--- a/vendor/boringssl/third_party/fiat/p256_64.h
+++ b/vendor/boringssl/third_party/fiat/p256_64.h
@@ -172,7 +172,7 @@
  *
  */
 static FIAT_P256_FIAT_INLINE void fiat_p256_mul(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1, const fiat_p256_montgomery_domain_field_element arg2) {
-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__)
+#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS)
   if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() &&
     CRYPTO_is_ADX_capable()) {
       fiat_p256_adx_mul(out1, arg1, arg2);
@@ -486,7 +486,7 @@
  *
  */
 static FIAT_P256_FIAT_INLINE void fiat_p256_square(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1) {
-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__)
+#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS)
   if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() &&
     CRYPTO_is_ADX_capable()) {
       fiat_p256_adx_sqr(out1, arg1);
--- a/vendor/libziparchive/zip_cd_entry_map.h
+++ b/vendor/libziparchive/zip_cd_entry_map.h
@@ -90,7 +90,7 @@
   static constexpr size_t offset_max = (1u << 20) - 1;
   static constexpr size_t length_max = (1u << 12) - 1;
   uint32_t name_offset : 20;
-  uint16_t name_length : 12;
+  uint32_t name_length : 12;
 };
 
 static_assert(sizeof(struct ZipStringOffset20) == 4);
