Last active
October 5, 2022 15:20
-
-
Save bennyfactor/3143794f56bf79d3645c816911481b30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git source/distro/google-perftools-1.7/src/tcmalloc.cc source/distro/google-perftools-1.7/src/tcmalloc.cc | |
index 8d94d20..0769425 100644 | |
--- source/distro/google-perftools-1.7/src/tcmalloc.cc | |
+++ source/distro/google-perftools-1.7/src/tcmalloc.cc | |
@@ -137,6 +137,13 @@ | |
# define WIN32_DO_PATCHING 1 | |
#endif | |
+// GLibc 2.14+ requires the hook functions be declared volatile, based on the value of the | |
+// define __MALLOC_HOOK_VOLATILE. For compatibility with older/non-GLibc implementations, | |
+// provide an empty definition. | |
+#if !defined(__MALLOC_HOOK_VOLATILE) | |
+#define __MALLOC_HOOK_VOLATILE | |
+#endif | |
+ | |
using STL_NAMESPACE::max; | |
using STL_NAMESPACE::numeric_limits; | |
using STL_NAMESPACE::vector; | |
@@ -1669,5 +1676,5 @@ static void *MemalignOverride(size_t align, size_t size, const void *caller) | |
MallocHook::InvokeNewHook(result, size); | |
return result; | |
} | |
-void *(*__memalign_hook)(size_t, size_t, const void *) = MemalignOverride; | |
+void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t, size_t, const void *) = MemalignOverride; | |
#endif // #ifndef TCMALLOC_FOR_DEBUGALLOCATION | |
--- source/ext/openssl/ossl_pkey_ec.c 2014-06-04 14:32:22.285979733 +0000 | |
+++ source/ext/openssl/ossl_pkey_ec.c 2014-06-04 14:33:54.186923484 +0000 | |
@@ -757,8 +757,10 @@ | |
method = EC_GFp_mont_method(); | |
} else if (id == s_GFp_nist) { | |
method = EC_GFp_nist_method(); | |
+#if !defined(OPENSSL_NO_EC2M) | |
} else if (id == s_GF2m_simple) { | |
method = EC_GF2m_simple_method(); | |
+#endif | |
} | |
if (method) { | |
@@ -811,8 +813,10 @@ | |
if (id == s_GFp) { | |
new_curve = EC_GROUP_new_curve_GFp; | |
+#if !defined(OPENSSL_NO_EC2M) | |
} else if (id == s_GF2m) { | |
new_curve = EC_GROUP_new_curve_GF2m; | |
+#endif | |
} else { | |
rb_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- source/ext/openssl/ossl_ssl.c | |
+++ source/ext/openssl/ossl_ssl.c | |
@@ -101,6 +101,18 @@ | |
OSSL_SSL_METHOD_ENTRY(TLSv1), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_server), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_client), | |
+#if defined(HAVE_TLSV1_2_METHOD) && defined(HAVE_TLSV1_2_SERVER_METHOD) && \ | |
+ defined(HAVE_TLSV1_2_CLIENT_METHOD) | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_2), | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_2_server), | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_2_client), | |
+#endif | |
+#if defined(HAVE_TLSV1_1_METHOD) && defined(HAVE_TLSV1_1_SERVER_METHOD) && \ | |
+ defined(HAVE_TLSV1_1_CLIENT_METHOD) | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_1), | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_1_server), | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_1_client), | |
+#endif | |
#if defined(HAVE_SSLV2_METHOD) && defined(HAVE_SSLV2_SERVER_METHOD) && \ | |
defined(HAVE_SSLV2_CLIENT_METHOD) | |
OSSL_SSL_METHOD_ENTRY(SSLv2), | |
--- source/ext/openssl/extconf.rb | |
+++ source/ext/openssl/extconf.rb | |
@@ -103,6 +103,12 @@ | |
have_func("SSLv2_method") | |
have_func("SSLv2_server_method") | |
have_func("SSLv2_client_method") | |
+have_func("TLSv1_1_method") | |
+have_func("TLSv1_1_server_method") | |
+have_func("TLSv1_1_client_method") | |
+have_func("TLSv1_2_method") | |
+have_func("TLSv1_2_server_method") | |
+have_func("TLSv1_2_client_method") | |
unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h']) | |
have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment