summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-08-08 16:33:13 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-08-08 20:17:55 +0200
commitfa896a1d807248b8bd3343b77f8668d80de1ec98 (patch)
treeb0c55bc77bc108b1f6b25d4b6dbb5b4d53b47eea /lib
parentMerge pull request #2122 from donaldsharp/zebra_nhs (diff)
downloadfrr-fa896a1d807248b8bd3343b77f8668d80de1ec98.tar.xz
frr-fa896a1d807248b8bd3343b77f8668d80de1ec98.zip
build: rework mallinfo test & find malloc_size
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/memory_vty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/memory_vty.c b/lib/memory_vty.c
index 972914bf2..388273128 100644
--- a/lib/memory_vty.c
+++ b/lib/memory_vty.c
@@ -21,9 +21,12 @@
#include <zebra.h>
/* malloc.h is generally obsolete, however GNU Libc mallinfo wants it. */
-#if (defined(GNU_LINUX) && defined(HAVE_MALLINFO))
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
-#endif /* HAVE_MALLINFO */
+#endif
+#ifdef HAVE_MALLOC_MALLOC_H
+#include <malloc/malloc.h>
+#endif
#include <dlfcn.h>
#include <link.h>