Skip to content

Instantly share code, notes, and snippets.

@pdfrod
Last active July 25, 2018 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdfrod/a07d6d0a26784fcc5992d8a5f59de433 to your computer and use it in GitHub Desktop.
Save pdfrod/a07d6d0a26784fcc5992d8a5f59de433 to your computer and use it in GitHub Desktop.
Patch for Ruby 2.5.1 to fix OpenSSL build error
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -122,8 +122,11 @@
have_func("SSL_is_server")
# added in 1.1.0
+if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h")
+ $defs.push("-DHAVE_OPAQUE_OPENSSL")
+end
have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
-have_struct_member("SSL", "ctx", "openssl/ssl.h") || $defs.push("-DHAVE_OPAQUE_OPENSSL")
have_func("BN_GENCB_new")
have_func("BN_GENCB_free")
have_func("BN_GENCB_get_arg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment