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);