void-packages/srcpkgs/pahole/patches/fix_mallinfo.patch

17 lines
338 B
Diff
Raw Normal View History

--- dtagnames.c.orig
+++ dtagnames.c
@@ -16,9 +16,13 @@
static void print_malloc_stats(void)
{
+#ifdef __GLIBC__
struct mallinfo m = mallinfo();
fprintf(stderr, "size: %u\n", m.uordblks);
+#else
+ fprintf(stderr, "malloc stats not available\n");
+#endif
}
static int class__tag_name(struct tag *tag, struct cu *cu __unused,