summaryrefslogtreecommitdiff
path: root/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-15 17:37:09 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-15 17:37:09 +0100
commit586819755b4dbfdffdc8a725ab7c0f86095b8489 (patch)
treed6790c838cfe9607c996e4913fdf11bad5fdd528 /net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch
parent3f71901f8c228f4de570abed1831ce3ee425343e (diff)
gentoo resync : 15.09.2018
Diffstat (limited to 'net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch')
-rw-r--r--net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch b/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch
new file mode 100644
index 000000000000..cb61b5f26fee
--- /dev/null
+++ b/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch
@@ -0,0 +1,83 @@
+From 9c7db45da9a6ddc5d65cd19704539579eb31d2ce Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Wed, 12 Sep 2018 10:35:45 -0700
+Subject: [PATCH] Fix failures with gcc-8
+
+Based on this PR https://github.com/grpc/grpc/pull/15443
+---
+ src/core/ext/filters/client_channel/client_channel.cc | 2 +-
+ .../client_channel/lb_policy/grpclb/load_balancer_api.cc | 3 ++-
+ src/core/ext/transport/chttp2/transport/flow_control.cc | 2 +-
+ src/core/lib/surface/channel.cc | 2 +-
+ src/core/tsi/alts_transport_security.cc | 2 +-
+ 5 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
+index d2bf4f388d..503fb1ac87 100644
+--- a/src/core/ext/filters/client_channel/client_channel.cc
++++ b/src/core/ext/filters/client_channel/client_channel.cc
+@@ -457,7 +457,7 @@ get_service_config_from_resolver_result_locked(channel_data* chand) {
+ grpc_uri* uri = grpc_uri_parse(server_uri, true);
+ GPR_ASSERT(uri->path[0] != '\0');
+ service_config_parsing_state parsing_state;
+- memset(&parsing_state, 0, sizeof(parsing_state));
++ memset(reinterpret_cast<void *>(&parsing_state), 0, sizeof(parsing_state));
+ parsing_state.server_name =
+ uri->path[0] == '/' ? uri->path + 1 : uri->path;
+ service_config->ParseGlobalParams(parse_retry_throttle_params,
+diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
+index f24281a5bf..74baf430f1 100644
+--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
++++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
+@@ -68,7 +68,8 @@ grpc_grpclb_request* grpc_grpclb_request_create(const char* lb_service_name) {
+ req->has_initial_request = true;
+ req->initial_request.has_name = true;
+ strncpy(req->initial_request.name, lb_service_name,
+- GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH);
++ GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH-1);
++ req->initial_request.name[GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH] = '\0';
+ return req;
+ }
+
+diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc
+index 53932bcb7f..4b1862735d 100644
+--- a/src/core/ext/transport/chttp2/transport/flow_control.cc
++++ b/src/core/ext/transport/chttp2/transport/flow_control.cc
+@@ -190,7 +190,7 @@ TransportFlowControl::TransportFlowControl(const grpc_chttp2_transport* t,
+ uint32_t TransportFlowControl::MaybeSendUpdate(bool writing_anyway) {
+ FlowControlTrace trace("t updt sent", this, nullptr);
+ const uint32_t target_announced_window =
+- static_cast<const uint32_t>(target_window());
++ static_cast<uint32_t>(target_window());
+ if ((writing_anyway || announced_window_ <= target_announced_window / 2) &&
+ announced_window_ != target_announced_window) {
+ const uint32_t announce = static_cast<uint32_t> GPR_CLAMP(
+diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc
+index 82635d3c21..f9d89657b3 100644
+--- a/src/core/lib/surface/channel.cc
++++ b/src/core/lib/surface/channel.cc
+@@ -100,7 +100,7 @@ grpc_channel* grpc_channel_create_with_builder(
+ return channel;
+ }
+
+- memset(channel, 0, sizeof(*channel));
++ memset(reinterpret_cast<void *>(channel), 0, sizeof(*channel));
+ channel->target = target;
+ channel->is_client = grpc_channel_stack_type_is_client(channel_stack_type);
+ size_t channel_tracer_max_nodes = 0; // default to off
+diff --git a/src/core/tsi/alts_transport_security.cc b/src/core/tsi/alts_transport_security.cc
+index 2fd408103b..51f9e9e85b 100644
+--- a/src/core/tsi/alts_transport_security.cc
++++ b/src/core/tsi/alts_transport_security.cc
+@@ -45,7 +45,7 @@ void grpc_tsi_alts_signal_for_cq_destroy() {
+ }
+
+ void grpc_tsi_alts_init() {
+- memset(&g_alts_resource, 0, sizeof(alts_shared_resource));
++ memset(reinterpret_cast<void *>(&g_alts_resource), 0, sizeof(alts_shared_resource));
+ gpr_mu_init(&g_alts_resource.mu);
+ gpr_cv_init(&g_alts_resource.cv);
+ }
+--
+2.18.0
+