summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/log.c4
-rw-r--r--lib/zebra.h4
-rw-r--r--lib/zlog.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/log.c b/lib/log.c
index a92f9e8855..b18b37efa3 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -8,6 +8,10 @@
#include <zebra.h>
+#ifdef HAVE_GLIBC_BACKTRACE
+#include <execinfo.h>
+#endif /* HAVE_GLIBC_BACKTRACE */
+
#include "zclient.h"
#include "log.h"
#include "memory.h"
diff --git a/lib/zebra.h b/lib/zebra.h
index a7db00b16e..f838990b30 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -156,10 +156,6 @@
#define UINT32_MAX (4294967295U)
#endif
-#ifdef HAVE_GLIBC_BACKTRACE
-#include <execinfo.h>
-#endif /* HAVE_GLIBC_BACKTRACE */
-
/* Local includes: */
#if !defined(__GNUC__)
#define __attribute__(x)
diff --git a/lib/zlog.c b/lib/zlog.c
index 2a6189573f..446bdd7021 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -5,6 +5,10 @@
#include "zebra.h"
+#ifdef HAVE_GLIBC_BACKTRACE
+#include <execinfo.h>
+#endif /* HAVE_GLIBC_BACKTRACE */
+
#include <unistd.h>
#include <sys/time.h>
#include <sys/mman.h>