diff options
author | L. E. Segovia <amy@centricular.com> | 2024-05-15 09:26:43 -0300 |
---|---|---|
committer | L. E. Segovia <amy@centricular.com> | 2024-05-15 09:26:43 -0300 |
commit | 163f9a1e9706bf4dc9bd04f4878fc3fef40efcec (patch) | |
tree | e85aa64bdec149bfc2a37a498e116f5d6f8fefc7 | |
parent | 170804fa41410f1ced15fe37e4d4bd64786c05d2 (diff) |
orccompiler: Work around MSYS2 SDK not defining RUNTIME_FUNCTION correctly on x86
The `UnwindData` member is supposed to be an union, but MSYS2 defines it
as `UnwindInfoAddress` only on IA64.
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/183>
-rw-r--r-- | orc/orccompiler.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/orc/orccompiler.c b/orc/orccompiler.c index 338ce36..61a62e7 100644 --- a/orc/orccompiler.c +++ b/orc/orccompiler.c @@ -522,7 +522,12 @@ orc_compiler_compile_program (OrcCompiler *compiler, OrcProgram *program, OrcTar table.thunk[4] = 0xd61f0000 | reg << 5; // br xip0 #else table.function_table.EndAddress = compiler->codeptr - compiler->code; +#ifdef __MINGW32__ + // They're the same member, but MSYS2 only defines the former under x86. + table.function_table.UnwindData = +#else table.function_table.UnwindInfoAddress = +#endif start_of_orcunwindinfo + ORC_STRUCT_OFFSET(OrcUnwindInfo, unwind_info); table.unwind_info.Version = 1; |