Skip to content

Instantly share code, notes, and snippets.

@bencao
Created April 17, 2015 05:52
Show Gist options
  • Save bencao/c6d548c29cbaedf20918 to your computer and use it in GitHub Desktop.
Save bencao/c6d548c29cbaedf20918 to your computer and use it in GitHub Desktop.
--- a/source/distro/google-perftools-1.7/src/tcmalloc.cc 2013-11-21 15:32:22.408760179 -0500
+++ b/source/distro/google-perftools-1.7/src/tcmalloc.cc 2013-11-21 15:23:43.908972961 -0500
@@ -1669,5 +1669,5 @@
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
--- a/source/distro/google-perftools-1.7/src/debugallocation.cc 2013-11-21 15:33:07.105408776 -0500
+++ b/source/distro/google-perftools-1.7/src/debugallocation.cc 2013-11-21 15:24:59.155608372 -0500
@@ -1135,7 +1135,7 @@
MallocHook::InvokeNewHook(p, size);
return p;
}
-void *(*__memalign_hook)(size_t, size_t, const void *) = MemalignOverride;
+void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t, size_t, const void *) = MemalignOverride;
extern "C" void* memalign(size_t align, size_t size) __THROW {
void *p = do_debug_memalign(align, size);
--- a/source/distro/google-perftools-1.7/src/base/linuxthreads.cc 2013-11-21 15:26:35.868901726 -0500
+++ b/source/distro/google-perftools-1.7/src/base/linuxthreads.cc 2013-11-21 15:27:57.538868131 -0500
@@ -193,7 +193,7 @@
/* Signal handler to help us recover from dying while we are attached to
* other threads.
*/
-static void SignalHandler(int signum, siginfo_t *si, void *data) {
+static void SignalHandler(int signum, siginfo *si, void *data) {
if (sig_pids != NULL) {
if (signum == SIGABRT) {
while (sig_num_threads-- > 0) {
--- a/source/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:16:09 41807
+++ a/source/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:46:42 41808
@@ -762,8 +762,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) {
@@ -817,8 +819,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 {
ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment