From 769e01fc4bacd4c6b6ffd6bbc36ff913844fa3b7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 23 Dec 2021 18:27:18 +0100 Subject: [PATCH] Don't use mallinfo on non-android and non-glibc --- test/mallinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/mallinfo.c b/test/mallinfo.c index e5df5a8..d38f92f 100644 --- a/test/mallinfo.c +++ b/test/mallinfo.c @@ -5,6 +5,7 @@ #include "test_util.h" static void print_mallinfo(void) { +#if defined(__GLIBC__) || defined(__ANDROID__) struct mallinfo info = mallinfo(); printf("mallinfo:\n"); printf("arena: %zu\n", (size_t)info.arena); @@ -17,6 +18,7 @@ static void print_mallinfo(void) { printf("uordblks: %zu\n", (size_t)info.uordblks); printf("fordblks: %zu\n", (size_t)info.fordblks); printf("keepcost: %zu\n", (size_t)info.keepcost); +#endif } OPTNONE int main(void) {