aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolas@nobis-crew.org>2016-02-05 15:08:12 -0800
committerGravatar Nicolas Noble <nicolas@nobis-crew.org>2016-02-05 15:08:12 -0800
commit86cbe3087ca5817416f9045047c9bb478dff8cb6 (patch)
tree8f1f6b1bf5130d5d2773a16b822cd0f74a6aa300 /src
parent5219c6d8e8ae0c584b0014166b7cf73dbfc8d456 (diff)
Fixing Mac build for Ruby.
Diffstat (limited to 'src')
-rw-r--r--src/ruby/ext/grpc/extconf.rb2
-rw-r--r--src/ruby/ext/grpc/rb_channel.c2
-rw-r--r--src/ruby/ext/grpc/rb_server_credentials.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 503403392d..b7c6cb3d7e 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -66,6 +66,8 @@ else
grpc_lib_dir = File.join(grpc_root, 'libs', grpc_config)
end
+ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7'
+
unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows
ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs'
ENV['CC'] = RbConfig::CONFIG['CC']
diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c
index d1e48753f2..0e6badbdaf 100644
--- a/src/ruby/ext/grpc/rb_channel.c
+++ b/src/ruby/ext/grpc/rb_channel.c
@@ -229,7 +229,7 @@ static VALUE grpc_rb_channel_watch_connectivity_state(VALUE self,
}
grpc_channel_watch_connectivity_state(
ch,
- NUM2LONG(last_state),
+ (grpc_connectivity_state)NUM2LONG(last_state),
grpc_rb_time_timeval(deadline, /* absolute time */ 0),
cq,
ROBJECT(tag));
diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c
index f866aecd28..4ea59b6b27 100644
--- a/src/ruby/ext/grpc/rb_server_credentials.c
+++ b/src/ruby/ext/grpc/rb_server_credentials.c
@@ -177,7 +177,7 @@ static VALUE grpc_rb_server_credentials_init(VALUE self, VALUE pem_root_certs,
VALUE key = Qnil;
VALUE key_cert = Qnil;
int auth_client = 0;
- int num_key_certs = 0;
+ long num_key_certs = 0;
int i;
if (NIL_P(force_client_auth) ||