commit:     3a42fbdae17de388d96fed660e15686b19473362
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 06:52:14 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 06:52:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a42fbda

net-libs/grpc: fix building with gcc8

Closes: https://bugs.gentoo.org/656166
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../grpc/files/0009-grpc-1.12.1-gcc8-fixes.patch   | 53 ++++++++++++++++++++++
 net-libs/grpc/grpc-1.12.1.ebuild                   |  1 +
 2 files changed, 54 insertions(+)

diff --git a/net-libs/grpc/files/0009-grpc-1.12.1-gcc8-fixes.patch 
b/net-libs/grpc/files/0009-grpc-1.12.1-gcc8-fixes.patch
new file mode 100644
index 00000000000..a9168f165e1
--- /dev/null
+++ b/net-libs/grpc/files/0009-grpc-1.12.1-gcc8-fixes.patch
@@ -0,0 +1,53 @@
+--- a/tmp/alts_transport_security.cc.ORIG      2018-04-13 20:08:11.000000000 
+0200
++++ b/src/core/tsi/alts_transport_security.cc  2018-05-20 16:54:49.995787548 
+0200
+@@ -45,7 +45,7 @@
+ }
+ 
+ void grpc_tsi_alts_init() {
+-  memset(&g_alts_resource, 0, sizeof(alts_shared_resource));
++  memset((void*)&g_alts_resource, 0, sizeof(alts_shared_resource));
+   gpr_mu_init(&g_alts_resource.mu);
+   gpr_cv_init(&g_alts_resource.cv);
+ }
+--- a/tmp/client_channel.cc.ORIG       2018-04-13 20:08:11.000000000 +0200
++++ b/src/core/ext/filters/client_channel/client_channel.cc    2018-05-20 
17:07:20.604746186 +0200
+@@ -416,7 +416,7 @@
+             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((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,
+--- a/tmp/channel.cc.ORIG      2018-04-13 20:08:11.000000000 +0200
++++ b/src/core/lib/surface/channel.cc  2018-05-20 16:58:01.632776988 +0200
+@@ -103,7 +103,7 @@
+     return channel;
+   }
+ 
+-  memset(channel, 0, sizeof(*channel));
++  memset((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
+@@ -280,7 +280,7 @@
+   }
+ 
+   grpc_call_create_args args;
+-  memset(&args, 0, sizeof(args));
++  memset((void*)&args, 0, sizeof(args));
+   args.channel = channel;
+   args.parent = parent_call;
+   args.propagation_mask = propagation_mask;
+--- a/tmp/flow_control.cc.ORIG 2018-04-13 20:08:11.000000000 +0200
++++ b/src/core/ext/transport/chttp2/transport/flow_control.cc  2018-05-20 
17:09:47.055738116 +0200
+@@ -187,7 +187,7 @@
+ 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/net-libs/grpc/grpc-1.12.1.ebuild b/net-libs/grpc/grpc-1.12.1.ebuild
index 774c0518b1d..e57c672f483 100644
--- a/net-libs/grpc/grpc-1.12.1.ebuild
+++ b/net-libs/grpc/grpc-1.12.1.ebuild
@@ -62,6 +62,7 @@ PATCHES=(
        "${FILESDIR}/0006-grpc-1.12.1-allow-system-openssl.patch"
        "${FILESDIR}/0007-grpc-1.12.1-allow-system-zlib.patch"
        "${FILESDIR}/0008-grpc-1.12.1-allow-system-cares.patch"
+       "${FILESDIR}/0009-grpc-1.12.1-gcc8-fixes.patch"
 )
 
 src_prepare() {

Reply via email to