From d2b4f232aae7b90a207a2b270e1bd957b510c1ac Mon Sep 17 00:00:00 2001 From: apolcyn Date: Mon, 19 Sep 2022 13:28:46 -0700 Subject: [PATCH] Fix ruby windows ucrt build (#31051) --- src/ruby/ext/grpc/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index a78d8b58b6d..5261dc6be51 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -86,7 +86,6 @@ end env_append 'CPPFLAGS', '-DGPR_BACKWARDS_COMPATIBILITY_MODE' env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_NAME_SUFFIX="\"RUBY\""' -env_append 'CPPFLAGS', '-DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt require_relative '../../lib/grpc/version' env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="\"' + GRPC::VERSION + '\""' @@ -111,6 +110,7 @@ unless windows exit 1 unless $? == 0 end +$CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt $CFLAGS << ' -I' + File.join(grpc_root, 'include') ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export')