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 -urB a/distro/google-perftools-1.7/src/tcmalloc.cc b/distro/google-perftools-1.7/src/tcmalloc.cc | |
--- a/distro/google-perftools-1.7/src/tcmalloc.cc | |
+++ b/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. |