summaryrefslogtreecommitdiff
path: root/ext/openssl/deprecation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/deprecation.rb')
-rw-r--r--ext/openssl/deprecation.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/openssl/deprecation.rb b/ext/openssl/deprecation.rb
new file mode 100644
index 0000000..d026f02
--- /dev/null
+++ b/ext/openssl/deprecation.rb
@@ -0,0 +1,16 @@
+module OpenSSL
+ def self.check_func(func, header)
+ unless flag = (@deprecated_warning_flag ||= nil)
+ if try_compile("", flag = "-Werror=deprecated-declarations")
+ if with_config("broken-apple-openssl")
+ flag = "-Wno-deprecated-declarations"
+ end
+ $warnflags << " #{flag}"
+ else
+ flag = ""
+ end
+ @deprecated_warning_flag = flag
+ end
+ have_func(func, header, flag)
+ end
+end