diff mbox

fix build with tcmalloc on Freed-ora 13

Message ID orwrkh8jpb.fsf@oliva.athome.lsd.ic.unicamp.br (mailing list archive)
State New, archived
Headers show

Commit Message

Alexandre Oliva March 2, 2011, 6:24 p.m. UTC
None
diff mbox

Patch

diff --git a/src/cmds.cc b/src/cmds.cc
index 4264f36..f4adf9d 100644
--- a/src/cmds.cc
+++ b/src/cmds.cc
@@ -46,6 +46,13 @@  void usage()
   generic_server_usage();
 }
 
+#ifdef HAVE_LIBTCMALLOC
+/* Adjust the return type.  */
+static bool isHeapProfilerRunning(void) {
+  return IsHeapProfilerRunning();
+}
+#endif
+
 int main(int argc, const char **argv) 
 {
   vector<const char*> args;
@@ -58,7 +65,7 @@  int main(int argc, const char **argv)
   common_set_defaults(true);
 #ifdef HAVE_LIBTCMALLOC
   g_conf.profiler_start = HeapProfilerStart;
-  g_conf.profiler_running = IsHeapProfilerRunning;
+  g_conf.profiler_running = isHeapProfilerRunning;
   g_conf.profiler_stop = HeapProfilerStop;
   g_conf.profiler_dump = HeapProfilerDump;
   g_conf.tcmalloc_have = true;
diff --git a/src/cosd.cc b/src/cosd.cc
index 7e77799..28730ce 100644
--- a/src/cosd.cc
+++ b/src/cosd.cc
@@ -42,6 +42,12 @@  void usage()
   generic_server_usage();
 }
 
+#ifdef HAVE_LIBTCMALLOC
+/* Adjust the return type.  */
+static bool isHeapProfilerRunning(void) {
+  return IsHeapProfilerRunning();
+}
+#endif
 
 int main(int argc, const char **argv) 
 {
@@ -62,7 +68,7 @@  int main(int argc, const char **argv)
   common_set_defaults(true);
 #ifdef HAVE_LIBTCMALLOC
   g_conf.profiler_start = HeapProfilerStart;
-  g_conf.profiler_running = IsHeapProfilerRunning;
+  g_conf.profiler_running = isHeapProfilerRunning;
   g_conf.profiler_stop = HeapProfilerStop;
   g_conf.profiler_dump = HeapProfilerDump;
   g_conf.tcmalloc_have = true;