Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Avlasov <yavlasov@google.com>
  • Loading branch information
yanavlasov committed Apr 19, 2024
1 parent 71b2a83 commit c2723da
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
12 changes: 12 additions & 0 deletions bazel/grpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ index 1bb970e049..81265483e9 100644
],
)

diff --git a/src/core/lib/promise/detail/promise_like.h b/src/core/lib/promise/detail/promise_like.h
--- a/src/core/lib/promise/detail/promise_like.h 2024-04-18 19:47:19.524155042 +0000
+++ b/src/core/lib/promise/detail/promise_like.h 2024-04-18 23:40:29.050761807 +0000
@@ -71,7 +71,7 @@

template <typename F>
class PromiseLike<F, absl::enable_if_t<!std::is_void<
- typename std::result_of<F()>::type>::value>> {
+ typename std::invoke_result<F>::type>::value>> {
private:
GPR_NO_UNIQUE_ADDRESS F f_;

24 changes: 12 additions & 12 deletions bazel/protobuf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,6 @@ diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
// This error has been generally flaky, but we need to disable it specifically
// to fix https://github.com/protocolbuffers/protobuf/issues/12313
#pragma clang diagnostic ignored "-Wunused-parameter"
diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h
--- a/src/google/protobuf/map_field.h 2023-06-30 17:14:18.934528580 +0000
+++ b/src/google/protobuf/map_field.h 2023-06-30 17:14:52.098500807 +0000
@@ -345,7 +345,7 @@

protected:
// "protected" stops users from deleting a `MapFieldBase *`
- ~MapFieldBase();
+ virtual ~MapFieldBase();

struct VTable : MapFieldBaseForParse::VTable {
bool (*lookup_map_value)(const MapFieldBase& map, const MapKey& map_key,
diff --git a/src/google/protobuf/compiler/BUILD.bazel b/src/google/protobuf/compiler/BUILD.bazel
--- a/src/google/protobuf/compiler/BUILD.bazel
+++ b/src/google/protobuf/compiler/BUILD.bazel
Expand Down Expand Up @@ -161,3 +149,15 @@ index 1c6a24945..c27d0bf2a 100644
#if PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII
#define PROTOBUF_DEBUG true
#else
diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc
--- a/src/google/protobuf/message_lite.cc 2024-04-19 15:49:01.333322873 +0000
+++ b/src/google/protobuf/message_lite.cc 2024-04-19 15:50:41.065136525 +0000
@@ -66,7 +66,7 @@

int MessageLite::GetCachedSize() const {
auto* cached_size = AccessCachedSize();
- if (PROTOBUF_PREDICT_FALSE(cached_size == nullptr)) return ByteSize();
+ if (PROTOBUF_PREDICT_FALSE(cached_size == nullptr)) return (int)ByteSizeLong();
return cached_size->Get();
}

Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ AltsTsiHandshaker::getHandshakeResult(const grpc::gcp::HandshakerResult& result,
tsi_zero_copy_grpc_protector* protector = nullptr;
grpc_core::ExecCtx exec_ctx;
tsi_result ok = alts_zero_copy_grpc_protector_create(
reinterpret_cast<const uint8_t*>(result.key_data().data()), AltsAes128GcmRekeyKeyLength, true,
grpc_core::GsecKeyFactory(
{reinterpret_cast<const uint8_t*>(result.key_data().data()), AltsAes128GcmRekeyKeyLength},
/*is_rekey=*/true),
is_client_,
/*is_integrity_only=*/false, /*enable_extra_copy=*/false, &max_frame_size, &protector);
if (ok != TSI_OK) {
Expand Down

0 comments on commit c2723da

Please sign in to comment.