From c8d651a51774ab70614cbf20b2e996e4f3d4bb9f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 12 Jan 2015 19:55:58 +0000 Subject: [PATCH] Protect use of mallinfo in #ifdef __GLIBC__ blocks --- src/commands.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands.cc b/src/commands.cc index 5fc53657..9e88d76d 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -29,7 +29,10 @@ #include #include #include + +#if defined(__GLIBC__) #include +#endif namespace Kakoune { @@ -835,7 +838,9 @@ const CommandDesc debug_cmd = { write_debug(domain_name((MemoryDomain)domain) + (": " + to_string(count))); } write_debug("Total: " + to_string(total)); + #if defined(__GLIBC__) write_debug("Malloced: " + to_string(mallinfo().uordblks)); + #endif } else throw runtime_error("unknown debug command '" + parser[0] + "'");