linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kallsyms: fix build without execinfo
@ 2025-06-01 18:32 Achill Gilgenast
  2025-06-02  5:50 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Achill Gilgenast @ 2025-06-01 18:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Achill Gilgenast, stable

Signed-off-by: Achill Gilgenast <fossdd@pwned.life>
Cc: stable@vger.kernel.org
---
 tools/include/linux/kallsyms.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/include/linux/kallsyms.h b/tools/include/linux/kallsyms.h
index 5a37ccbec54f..f61a01dd7eb7 100644
--- a/tools/include/linux/kallsyms.h
+++ b/tools/include/linux/kallsyms.h
@@ -18,6 +18,7 @@ static inline const char *kallsyms_lookup(unsigned long addr,
 	return NULL;
 }
 
+#ifdef HAVE_BACKTRACE_SUPPORT
 #include <execinfo.h>
 #include <stdlib.h>
 static inline void print_ip_sym(const char *loglvl, unsigned long ip)
@@ -30,5 +31,8 @@ static inline void print_ip_sym(const char *loglvl, unsigned long ip)
 
 	free(name);
 }
+#else
+static inline void print_ip_sym(const char *loglvl, unsigned long ip) {}
+#endif
 
 #endif
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-15 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-01 18:32 [PATCH] kallsyms: fix build without execinfo Achill Gilgenast
2025-06-02  5:50 ` Greg KH
2025-06-15 19:07   ` fossdd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).