Created
March 30, 2026 21:41
-
-
Save theoparis/14661ecc277c3c7f1d3da6e9b6df1f50 to your computer and use it in GitHub Desktop.
wine patches for building with llvm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dlls/ntdll/unix/dwarf.h b/dlls/ntdll/unix/dwarf.h | |
| index eafb232..30725b4 100644 | |
| --- a/dlls/ntdll/unix/dwarf.h | |
| +++ b/dlls/ntdll/unix/dwarf.h | |
| @@ -255,7 +255,9 @@ struct dwarf_fde | |
| unsigned int cie_offset; | |
| }; | |
| +#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) | |
| extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *); | |
| +#endif | |
| static unsigned char dwarf_get_u1( const unsigned char **p ) | |
| { | |
| diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c | |
| index 7e644a6..b2d0fe5 100644 | |
| --- a/dlls/ntdll/unix/signal_x86_64.c | |
| +++ b/dlls/ntdll/unix/signal_x86_64.c | |
| @@ -730,7 +730,7 @@ static NTSTATUS libunwind_virtual_unwind( ULONG64 ip, ULONG64 *frame, CONTEXT *c | |
| unw_proc_info_t info; | |
| int rc; | |
| -#ifdef __APPLE__ | |
| +#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) | |
| rc = unw_getcontext( &unw_context ); | |
| if (rc == UNW_ESUCCESS) | |
| rc = unw_init_local( &cursor, &unw_context ); | |
| @@ -855,12 +855,14 @@ NTSTATUS unwind_builtin_dll( void *args ) | |
| struct unwind_builtin_dll_params *params = args; | |
| DISPATCHER_CONTEXT *dispatch = params->dispatch; | |
| CONTEXT *context = params->context; | |
| +#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) | |
| struct dwarf_eh_bases bases; | |
| const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases ); | |
| if (fde) | |
| 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, | |
| &dispatch->LanguageHandler, &dispatch->HandlerData ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment