From da2a7ddd2e71575216d0e134c71fad317af4320b Mon Sep 17 00:00:00 2001
From: Dharanendiran <dharanendiran@timesys.com>
Date: Fri, 25 Sep 2026 18:19:45 +0530
Subject: [PATCH] guard backtrace use with HAVE_EXECINFO_H

---
 debuginfod/debuginfod.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 88a69d0..004784c 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -5676,7 +5676,7 @@ default_concurrency() // guaranteed >= 1
 // 30879: Something to help out in case of an uncaught exception.
 void my_terminate_handler()
 {
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) && defined(HAVE_EXECINFO_H)
   void *array[40];
   int size = backtrace (array, 40);
   backtrace_symbols_fd (array, size, STDERR_FILENO);
-- 
2.25.1

