From 2fa74f60269fad99986ca934d11095411e219381 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Thu, 4 Oct 2012 18:37:58 +0200 Subject: [PATCH] Use hidden visibility by default --- ext/digest/extconf.rb | 1 + ext/digest/sha3.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/digest/extconf.rb b/ext/digest/extconf.rb index 4219c0a..b5abbfa 100644 --- a/ext/digest/extconf.rb +++ b/ext/digest/extconf.rb @@ -1,2 +1,3 @@ require 'mkmf' +$CFLAGS << " -fvisibility=hidden" create_makefile('digest/sha3') diff --git a/ext/digest/sha3.c b/ext/digest/sha3.c index 9372a3a..92965da 100644 --- a/ext/digest/sha3.c +++ b/ext/digest/sha3.c @@ -119,7 +119,7 @@ rb_sha3_singleton_digest(int argc, VALUE *argv, VALUE klass) { } } -void +void __attribute__((visibility("default"))) Init_sha3() { mDigest = rb_define_module("Digest"); cSHA3 = rb_define_class_under(mDigest, "SHA3", rb_cObject);