git: 8759687fa0d4 - main - net/rubygem-grpc: fix build with clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 May 2023 14:16:19 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=8759687fa0d46934e4d3af6b844adb56607b4689 commit 8759687fa0d46934e4d3af6b844adb56607b4689 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-20 20:06:45 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-23 14:15:21 +0000 net/rubygem-grpc: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building net/rubygem-grpc: rb_channel.c:764:40: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(void *)' (aka 'unsigned long (*)(void *)') [-Wincompatible-function-pointer-types] background_thread = rb_thread_create(run_poll_channels_loop, NULL); ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/intern/thread.h:190:32: note: passing argument to parameter 'f' here VALUE rb_thread_create(VALUE (*f)(void *g), void *g); ^ Fix it by adjusting the parameters for the thread callback functions. PR: 271540 Approved by: sunpoet (maintainer) MFH: 2023Q2 --- net/rubygem-grpc/Makefile | 1 + net/rubygem-grpc/files/patch-clang16 | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/net/rubygem-grpc/Makefile b/net/rubygem-grpc/Makefile index 9da655372c1e..2d2d585564ea 100644 --- a/net/rubygem-grpc/Makefile +++ b/net/rubygem-grpc/Makefile @@ -1,5 +1,6 @@ PORTNAME= grpc PORTVERSION= 1.54.0 +PORTREVISION= 1 CATEGORIES= net rubygems MASTER_SITES= RG diff --git a/net/rubygem-grpc/files/patch-clang16 b/net/rubygem-grpc/files/patch-clang16 new file mode 100644 index 000000000000..9a16799fd3f6 --- /dev/null +++ b/net/rubygem-grpc/files/patch-clang16 @@ -0,0 +1,22 @@ +--- src/ruby/ext/grpc/rb_channel.c.orig 2023-05-20 19:48:13 UTC ++++ src/ruby/ext/grpc/rb_channel.c +@@ -694,7 +694,7 @@ static void run_poll_channels_loop_unblocking_func(voi + } + + // Poll channel connectivity states in background thread without the GIL. +-static VALUE run_poll_channels_loop(VALUE arg) { ++static VALUE run_poll_channels_loop(void *arg) { + (void)arg; + gpr_log( + GPR_DEBUG, +--- src/ruby/ext/grpc/rb_event_thread.c.orig 2023-05-20 19:51:52 UTC ++++ src/ruby/ext/grpc/rb_event_thread.c +@@ -114,7 +114,7 @@ static void grpc_rb_event_unblocking_func(void* arg) { + + /* This is the implementation of the thread that handles auth metadata plugin + * events */ +-static VALUE grpc_rb_event_thread(VALUE arg) { ++static VALUE grpc_rb_event_thread(void *arg) { + grpc_rb_event* event; + (void)arg; + grpc_ruby_init();