[llvm] [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (PR #125186)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 01:06:51 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Brad Smith (brad0)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/125186.diff


1 Files Affected:

- (modified) llvm/lib/Support/Unix/Signals.inc (+2-1) 


``````````diff
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 9a12663228a368..61670a6e93140d 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -468,7 +468,8 @@ void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback FnPtr,
 
 #if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) &&                            \
     (defined(__linux__) || defined(__FreeBSD__) ||                             \
-     defined(__FreeBSD_kernel__) || defined(__NetBSD__))
+     defined(__FreeBSD_kernel__) || defined(__NetBSD__)                        \
+     defined(__OpenBSD__) || defined(__DragonFly__))
 struct DlIteratePhdrData {
   void **StackTrace;
   int depth;

``````````

</details>


https://github.com/llvm/llvm-project/pull/125186


More information about the llvm-commits mailing list