From d43fe538f4737f1f7b9f48460e0285fa89d27ae1 Mon Sep 17 00:00:00 2001 From: Neeraj Dwivedi Date: Tue, 2 Jun 2026 14:35:18 +0530 Subject: [PATCH] fix: Fixed client library build issue for msvc compiler --- .../internal/oauth2_regional_access_boundary_token_manager.h | 3 ++- google/cloud/internal/rest_opentelemetry.cc | 2 +- google/cloud/internal/tracing_rest_client.cc | 2 +- google/cloud/internal/win32/sign_using_sha256.cc | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/google/cloud/internal/oauth2_regional_access_boundary_token_manager.h b/google/cloud/internal/oauth2_regional_access_boundary_token_manager.h index 85d1ba3f01245..b96c060711119 100644 --- a/google/cloud/internal/oauth2_regional_access_boundary_token_manager.h +++ b/google/cloud/internal/oauth2_regional_access_boundary_token_manager.h @@ -183,7 +183,8 @@ class RegionalAccessBoundaryTokenManager stub = iam_stub_, retry_policy = retry_policy_->clone(), backoff_policy = backoff_policy_->clone(), - options = options_]() mutable { + options = options_, + kLocation = kLocation]() mutable { auto refresh_attempt_fn = [stub](rest_internal::RestContext&, Options const&, Request const& request) { return stub->AllowedLocations(request); diff --git a/google/cloud/internal/rest_opentelemetry.cc b/google/cloud/internal/rest_opentelemetry.cc index 4d5d1d839b194..672a582e51b10 100644 --- a/google/cloud/internal/rest_opentelemetry.cc +++ b/google/cloud/internal/rest_opentelemetry.cc @@ -81,7 +81,7 @@ opentelemetry::nostd::shared_ptr MakeSpanHttp( {/*sc::kUrlFull=*/"url.full", request.path()}}, options); for (auto const& kv : request.headers()) { - auto const name = "http.request.header." + std::string{kv.first}; + auto const name = std::string("http.request.header.") + kv.first.name(); if (kv.second.EmptyValues()) { span->SetAttribute(name, ""); continue; diff --git a/google/cloud/internal/tracing_rest_client.cc b/google/cloud/internal/tracing_rest_client.cc index 0e92b092919e7..cf6dd6605324f 100644 --- a/google/cloud/internal/tracing_rest_client.cc +++ b/google/cloud/internal/tracing_rest_client.cc @@ -71,7 +71,7 @@ StatusOr> EndResponseSpan( *context.local_port()); } for (auto const& kv : context.headers()) { - auto const name = "http.request.header." + std::string{kv.first}; + auto const name = std::string("http.request.header.") + kv.first.name(); if (kv.second.EmptyValues()) { span->SetAttribute(name, ""); continue; diff --git a/google/cloud/internal/win32/sign_using_sha256.cc b/google/cloud/internal/win32/sign_using_sha256.cc index 15ecc6e6f9103..81da80cb93510 100644 --- a/google/cloud/internal/win32/sign_using_sha256.cc +++ b/google/cloud/internal/win32/sign_using_sha256.cc @@ -136,7 +136,8 @@ StatusOr> SignSha256Digest(BCRYPT_KEY_HANDLE key, } // namespace StatusOr> SignUsingSha256( - std::string const& str, std::string const& pem_contents) { + std::string const& str, std::string const& pem_contents, + SignatureFormat format) { auto pem_buffer = DecodePem(pem_contents); if (!pem_buffer) return std::move(pem_buffer).status();