Fix build with llvm-libunwind, and also fix for non-llvm libunwind when using clang+bfd given clang doesn't have _Unwind_Find_FDE in its rtlib and expects it from llvm-libunwind. The _CONFIG_H_ check is for context; struct dwarf_eh_bases bases; +#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases ); @@ -779,4 +780,5 @@ return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde, &bases, &dispatch->LanguageHandler, &dispatch->HandlerData ); +#endif #ifdef HAVE_LIBUNWIND return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context,