]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: HAVE_GLIBC_BACKTRACE does not belong in zebra.h
authorDonald Sharp <sharpd@nvidia.com>
Thu, 4 Jan 2024 19:20:40 +0000 (14:20 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 4 Jan 2024 19:20:40 +0000 (14:20 -0500)
The backtrace functionality has been abstracted over
to zlog_backtrace().  Now that every place uses this
move the inclusion for HAVE_GLIBC_BACKTRACE into
the appropriate files instead of having everyone
pay for this costly include.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/log.c
lib/zebra.h
lib/zlog.c

index a92f9e8855e130a11aac4d7dd02fe1c7bc238f84..b18b37efa3f50f563a4f3b411990af5e5b79c734 100644 (file)
--- 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"
index a7db00b16e5c97422c7d049c179b409f6f5f0f46..f838990b30a49d12dd883f3a64c75d3072fadb0f 100644 (file)
 #define UINT32_MAX     (4294967295U)
 #endif
 
-#ifdef HAVE_GLIBC_BACKTRACE
-#include <execinfo.h>
-#endif /* HAVE_GLIBC_BACKTRACE */
-
 /* Local includes: */
 #if !defined(__GNUC__)
 #define __attribute__(x)
index 2a6189573fe7aef7e880dcdc1b54b28fa6dda549..446bdd7021fd31705fb76946a70335bd89dad677 100644 (file)
@@ -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>