From 5f7063e996b878ec8a3a1921fdbad0ecb8570970 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 20 Nov 2024 21:59:52 +0100 Subject: [PATCH 1/8] WIP: Test sys/ucontext.h --- src/coreclr/nativeaot/Runtime/unix/UnixContext.h | 2 +- src/coreclr/pal/src/configure.cmake | 2 +- src/coreclr/pal/src/include/pal/context.h | 4 +--- src/native/external/libunwind/include/libunwind-aarch64.h | 6 +++++- src/native/external/libunwind/include/libunwind-x86_64.h | 4 ++++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/coreclr/nativeaot/Runtime/unix/UnixContext.h b/src/coreclr/nativeaot/Runtime/unix/UnixContext.h index 662b697715da0..fa54d1d76836f 100644 --- a/src/coreclr/nativeaot/Runtime/unix/UnixContext.h +++ b/src/coreclr/nativeaot/Runtime/unix/UnixContext.h @@ -4,7 +4,7 @@ #ifndef __UNIX_CONTEXT_H__ #define __UNIX_CONTEXT_H__ -#include +#include // Convert Unix native context to PAL_LIMITED_CONTEXT void NativeContextToPalContext(const void* context, PAL_LIMITED_CONTEXT* palContext); diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 79140466b97d5..1dfb14f2c4d84 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -615,7 +615,7 @@ endif() check_c_source_compiles(" #include -#include +#include int main(int argc, char **argv) { unw_context_t libUnwindContext; diff --git a/src/coreclr/pal/src/include/pal/context.h b/src/coreclr/pal/src/include/pal/context.h index 5d515a1434e00..e99abd12b4861 100644 --- a/src/coreclr/pal/src/include/pal/context.h +++ b/src/coreclr/pal/src/include/pal/context.h @@ -33,9 +33,7 @@ extern "C" /* A type to wrap the native context type, which is ucontext_t on some * platforms and another type elsewhere. */ #if HAVE_UCONTEXT_T -#if HAVE_UCONTEXT_H -#include -#endif // HAVE_UCONTEXT_H +#include typedef ucontext_t native_context_t; #else // HAVE_UCONTEXT_T diff --git a/src/native/external/libunwind/include/libunwind-aarch64.h b/src/native/external/libunwind/include/libunwind-aarch64.h index 7751e4eb8be5e..28c2678f514dd 100644 --- a/src/native/external/libunwind/include/libunwind-aarch64.h +++ b/src/native/external/libunwind/include/libunwind-aarch64.h @@ -34,9 +34,13 @@ extern "C" { #include #include -#include #include #include +#ifdef __APPLE__ +#include +#else +#include +#endif #ifndef UNW_EMPTY_STRUCT # define UNW_EMPTY_STRUCT uint8_t unused; diff --git a/src/native/external/libunwind/include/libunwind-x86_64.h b/src/native/external/libunwind/include/libunwind-x86_64.h index a2fea33b3ba31..5bafbcdc8b61f 100644 --- a/src/native/external/libunwind/include/libunwind-x86_64.h +++ b/src/native/external/libunwind/include/libunwind-x86_64.h @@ -35,7 +35,11 @@ extern "C" { #include #include #include +#ifdef __APPLE__ +#include +#else #include +#endif #ifndef UNW_EMPTY_STRUCT # define UNW_EMPTY_STRUCT uint8_t unused; From 1e24599ee05f94566dc1139d23a39167f49ba58f Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 22 Nov 2024 18:44:58 +0100 Subject: [PATCH 2/8] Drop HP libunwind fallback on Apple platforms --- src/coreclr/pal/src/CMakeLists.txt | 22 +----- src/coreclr/pal/src/configure.cmake | 2 +- .../pal/src/exception/remote-unwind.cpp | 71 +++++-------------- .../libunwind/include/libunwind-aarch64.h | 4 -- .../libunwind/include/libunwind-x86_64.h | 4 -- 5 files changed, 20 insertions(+), 83 deletions(-) diff --git a/src/coreclr/pal/src/CMakeLists.txt b/src/coreclr/pal/src/CMakeLists.txt index 0a3ed749f29fb..b258179cbd866 100644 --- a/src/coreclr/pal/src/CMakeLists.txt +++ b/src/coreclr/pal/src/CMakeLists.txt @@ -222,29 +222,11 @@ add_library(coreclrpal ) # Build separate pal library for DAC (addition to regular pal library) -if(CLR_CMAKE_TARGET_OSX) - set(LIBUNWIND_DAC_OBJECTS $) - +if(NOT FEATURE_CROSSBITNESS) add_library(coreclrpal_dac STATIC exception/remote-unwind.cpp - ${LIBUNWIND_DAC_OBJECTS} - ) - - target_include_directories(coreclrpal_dac PUBLIC - ${CLR_SRC_NATIVE_DIR}/external/libunwind/include - ${CLR_SRC_NATIVE_DIR}/external/libunwind/include/tdep - ${CLR_ARTIFACTS_OBJ_DIR}/external/libunwind/include - ${CLR_ARTIFACTS_OBJ_DIR}/external/libunwind/include/tdep ) - - target_compile_definitions(coreclrpal_dac PUBLIC -DUNW_REMOTE_ONLY) -else() - if(NOT FEATURE_CROSSBITNESS) - add_library(coreclrpal_dac STATIC - exception/remote-unwind.cpp - ) - endif(NOT FEATURE_CROSSBITNESS) -endif(CLR_CMAKE_TARGET_OSX) +endif(NOT FEATURE_CROSSBITNESS) # There is only one function exported in 'tracepointprovider.cpp' namely 'PAL_InitializeTracing', # which is guarded with '#if defined(__linux__)'. On macOS, Xcode issues the following warning: diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 1dfb14f2c4d84..8a28c8a41291f 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -625,7 +625,7 @@ int main(int argc, char **argv) }" UNWIND_CONTEXT_IS_UCONTEXT_T) check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC) -check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS) +check_symbol_exists(unw_create_addr_space libunwind.h HAVE_UNW_CREATE_ADDR_SPACE) check_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) check_cxx_source_compiles(" diff --git a/src/coreclr/pal/src/exception/remote-unwind.cpp b/src/coreclr/pal/src/exception/remote-unwind.cpp index aec8822ceb45f..b98e3b27fdcaf 100644 --- a/src/coreclr/pal/src/exception/remote-unwind.cpp +++ b/src/coreclr/pal/src/exception/remote-unwind.cpp @@ -143,7 +143,7 @@ unw_get_proc_info_in_range( unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, - int need_unwind_info, + int unwind_info, void *arg); #endif // FEATURE_USE_SYSTEM_LIBUNWIND @@ -887,8 +887,7 @@ static bool ExtractProcInfoFromFde( const libunwindInfo* info, unw_word_t* addrp, - unw_proc_info_t *pip, - int need_unwind_info) + unw_proc_info_t *pip) { unw_word_t addr = *addrp; @@ -917,35 +916,6 @@ ExtractProcInfoFromFde( return false; } - // Now fill out the proc info if requested - if (need_unwind_info) - { - if (dci.have_abi_marker) - { - if (!ReadValue16(info, &addr, &dci.abi)) { - return false; - } - if (!ReadValue16(info, &addr, &dci.tag)) { - return false; - } - } - if (dci.sized_augmentation) { - dci.fde_instr_start = augmentationEndAddr; - } - else { - dci.fde_instr_start = addr; - } - dci.fde_instr_end = fdeEndAddr; - - pip->format = UNW_INFO_FORMAT_TABLE; - pip->unwind_info_size = sizeof(dci); - pip->unwind_info = malloc(sizeof(dci)); - if (pip->unwind_info == nullptr) { - return -UNW_ENOMEM; - } - memcpy(pip->unwind_info, &dci, sizeof(dci)); - } - return true; } @@ -1157,8 +1127,7 @@ SearchDwarfSection( unw_word_t dwarfSectionAddr, unw_word_t dwarfSectionSize, uint32_t fdeSectionHint, - unw_proc_info_t *pip, - int need_unwind_info) + unw_proc_info_t *pip) { unw_word_t addr = dwarfSectionAddr + fdeSectionHint; unw_word_t fdeAddr; @@ -1175,7 +1144,7 @@ SearchDwarfSection( } if (ip >= ipStart && ip < ipEnd) { - if (!ExtractProcInfoFromFde(info, &fdeAddr, pip, need_unwind_info)) { + if (!ExtractProcInfoFromFde(info, &fdeAddr, pip)) { ERROR("ExtractProcInfoFromFde FAILED for ip %p\n", (void*)ip); break; } @@ -1188,7 +1157,7 @@ SearchDwarfSection( static bool -GetProcInfo(unw_word_t ip, unw_proc_info_t *pip, libunwindInfo* info, bool* step, int need_unwind_info) +GetProcInfo(unw_word_t ip, unw_proc_info_t *pip, libunwindInfo* info, bool* step) { memset(pip, 0, sizeof(*pip)); *step = false; @@ -1278,7 +1247,7 @@ GetProcInfo(unw_word_t ip, unw_proc_info_t *pip, libunwindInfo* info, bool* step #else #error unsupported architecture #endif - if (SearchDwarfSection(info, ip, ehframeSectionAddr, ehframeSectionSize, dwarfOffsetHint, pip, need_unwind_info)) { + if (SearchDwarfSection(info, ip, ehframeSectionAddr, ehframeSectionSize, dwarfOffsetHint, pip)) { TRACE("SUCCESS: found in eh frame from compact hint for %p\n", (void*)ip); return true; } @@ -1294,7 +1263,7 @@ GetProcInfo(unw_word_t ip, unw_proc_info_t *pip, libunwindInfo* info, bool* step // Look in dwarf unwind info next if (ehframeSectionAddr != 0) { - if (SearchDwarfSection(info, ip, ehframeSectionAddr, ehframeSectionSize, 0, pip, need_unwind_info)) { + if (SearchDwarfSection(info, ip, ehframeSectionAddr, ehframeSectionSize, 0, pip)) { TRACE("SUCCESS: found in eh frame for %p\n", (void*)ip); return true; } @@ -2033,6 +2002,7 @@ static void UnwindContextToContext(unw_cursor_t *cursor, CONTEXT *winContext) #endif } +#ifndef __APPLE__ static int get_dyn_info_list_addr(unw_addr_space_t as, unw_word_t *dilap, void *arg) { @@ -2217,14 +2187,6 @@ static int find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int need_unwind_info, void *arg) { auto *info = (libunwindInfo*)arg; -#ifdef __APPLE__ - bool step; - if (!GetProcInfo(ip, pip, info, &step, need_unwind_info)) { - return -UNW_EINVAL; - } - _ASSERTE(!step); - return UNW_ESUCCESS; -#else memset(pip, 0, sizeof(*pip)); Ehdr ehdr; @@ -2395,7 +2357,7 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int nee } // Now get the unwind info - if (!ExtractProcInfoFromFde(info, &fdeAddr, pip, need_unwind_info)) { + if (!ExtractProcInfoFromFde(info, &fdeAddr, pip)) { ERROR("ExtractProcInfoFromFde\n"); return -UNW_EINVAL; } @@ -2407,8 +2369,6 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int nee info->FunctionStart = pip->start_ip; return UNW_ESUCCESS; #endif // HAVE_GET_PROC_INFO_IN_RANGE || !defined(HOST_UNIX) - -#endif // __APPLE__ } static void @@ -2439,6 +2399,7 @@ static unw_accessors_t init_unwind_accessors() }; static unw_accessors_t unwind_accessors = init_unwind_accessors(); +#endif // __APPLE__ /*++ Function: @@ -2476,10 +2437,10 @@ PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *cont bool step; #if defined(TARGET_AMD64) TRACE("Unwind: rip %p rsp %p rbp %p\n", (void*)context->Rip, (void*)context->Rsp, (void*)context->Rbp); - result = GetProcInfo(context->Rip, &procInfo, &info, &step, false); + result = GetProcInfo(context->Rip, &procInfo, &info, &step); #elif defined(TARGET_ARM64) TRACE("Unwind: pc %p sp %p fp %p\n", (void*)context->Pc, (void*)context->Sp, (void*)context->Fp); - result = GetProcInfo(context->Pc, &procInfo, &info, &step, false); + result = GetProcInfo(context->Pc, &procInfo, &info, &step); if (result && step) { // If the PC is at the start of the function, the previous instruction is BL and the unwind encoding is frameless @@ -2498,7 +2459,7 @@ PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *cont (opcode & ARM64_BLRA_OPCODE_MASK) == ARM64_BLRA_OPCODE) { TRACE("Unwind: getting unwind info for PC - 1 opcode %08x\n", opcode); - result = GetProcInfo(context->Pc - 1, &procInfo, &info, &step, false); + result = GetProcInfo(context->Pc - 1, &procInfo, &info, &step); } else { @@ -2519,8 +2480,7 @@ PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *cont result = StepWithCompactEncoding(&info, procInfo.format, procInfo.start_ip); goto exit; } -#endif - +#else addrSpace = unw_create_addr_space(&unwind_accessors, 0); st = unw_init_remote(&cursor, addrSpace, &info); @@ -2544,16 +2504,19 @@ PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *cont GetContextPointers(&cursor, NULL, contextPointers); } result = TRUE; +#endif // __APPLE__ exit: if (functionStart) { *functionStart = info.FunctionStart; } +#ifndef __APPLE__ if (addrSpace != 0) { unw_destroy_addr_space(addrSpace); } +#endif // !__APPLE__ return result; } diff --git a/src/native/external/libunwind/include/libunwind-aarch64.h b/src/native/external/libunwind/include/libunwind-aarch64.h index 28c2678f514dd..e33683e6b454a 100644 --- a/src/native/external/libunwind/include/libunwind-aarch64.h +++ b/src/native/external/libunwind/include/libunwind-aarch64.h @@ -36,11 +36,7 @@ extern "C" { #include #include #include -#ifdef __APPLE__ -#include -#else #include -#endif #ifndef UNW_EMPTY_STRUCT # define UNW_EMPTY_STRUCT uint8_t unused; diff --git a/src/native/external/libunwind/include/libunwind-x86_64.h b/src/native/external/libunwind/include/libunwind-x86_64.h index 5bafbcdc8b61f..a2fea33b3ba31 100644 --- a/src/native/external/libunwind/include/libunwind-x86_64.h +++ b/src/native/external/libunwind/include/libunwind-x86_64.h @@ -35,11 +35,7 @@ extern "C" { #include #include #include -#ifdef __APPLE__ -#include -#else #include -#endif #ifndef UNW_EMPTY_STRUCT # define UNW_EMPTY_STRUCT uint8_t unused; From 659046df5cbfea50c68b4bac0bc62623a6e64801 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 22 Nov 2024 18:46:46 +0100 Subject: [PATCH 3/8] Revert accidental changes --- src/coreclr/pal/src/configure.cmake | 2 +- src/coreclr/pal/src/exception/remote-unwind.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 8a28c8a41291f..1dfb14f2c4d84 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -625,7 +625,7 @@ int main(int argc, char **argv) }" UNWIND_CONTEXT_IS_UCONTEXT_T) check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC) -check_symbol_exists(unw_create_addr_space libunwind.h HAVE_UNW_CREATE_ADDR_SPACE) +check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS) check_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) check_cxx_source_compiles(" diff --git a/src/coreclr/pal/src/exception/remote-unwind.cpp b/src/coreclr/pal/src/exception/remote-unwind.cpp index b98e3b27fdcaf..6e2097a627c5d 100644 --- a/src/coreclr/pal/src/exception/remote-unwind.cpp +++ b/src/coreclr/pal/src/exception/remote-unwind.cpp @@ -143,7 +143,7 @@ unw_get_proc_info_in_range( unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, - int unwind_info, + int need_unwind_info, void *arg); #endif // FEATURE_USE_SYSTEM_LIBUNWIND From 5af4acf0eebbd827d8739dce40bdc803b6bd0def Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 22 Nov 2024 18:47:44 +0100 Subject: [PATCH 4/8] Revert one more unnecessary change --- src/coreclr/pal/src/configure.cmake | 2 +- src/native/external/libunwind/include/libunwind-aarch64.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 1dfb14f2c4d84..089d7d86c9a37 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -626,7 +626,7 @@ int main(int argc, char **argv) check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC) check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS) -check_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) +src/native/external/libunwind/include/libunwind-aarch64.hcheck_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) check_cxx_source_compiles(" #include diff --git a/src/native/external/libunwind/include/libunwind-aarch64.h b/src/native/external/libunwind/include/libunwind-aarch64.h index e33683e6b454a..7751e4eb8be5e 100644 --- a/src/native/external/libunwind/include/libunwind-aarch64.h +++ b/src/native/external/libunwind/include/libunwind-aarch64.h @@ -34,9 +34,9 @@ extern "C" { #include #include +#include #include #include -#include #ifndef UNW_EMPTY_STRUCT # define UNW_EMPTY_STRUCT uint8_t unused; From 378fcbc1ffc779b531308de90ab1eba62268c26e Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 22 Nov 2024 18:49:52 +0100 Subject: [PATCH 5/8] :( --- src/coreclr/pal/src/configure.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 089d7d86c9a37..1dfb14f2c4d84 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -626,7 +626,7 @@ int main(int argc, char **argv) check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC) check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS) -src/native/external/libunwind/include/libunwind-aarch64.hcheck_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) +check_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE) check_cxx_source_compiles(" #include From 6a26378b8840c4c177b7a1c1373a895f323cd288 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 22 Nov 2024 19:44:22 +0100 Subject: [PATCH 6/8] Fix osx-x64 build --- src/coreclr/pal/src/exception/remote-unwind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/src/exception/remote-unwind.cpp b/src/coreclr/pal/src/exception/remote-unwind.cpp index 6e2097a627c5d..af9a252a8d9fd 100644 --- a/src/coreclr/pal/src/exception/remote-unwind.cpp +++ b/src/coreclr/pal/src/exception/remote-unwind.cpp @@ -1464,7 +1464,7 @@ StepWithCompactEncodingFrameless(const libunwindInfo* info, compact_unwind_encod } } - uint64_t savedRegisters = context->Rsp + stack_size - 8 - (8 * register_count); + unw_word_t savedRegisters = context->Rsp + stack_size - 8 - (8 * register_count); for (int i = 0; i < register_count; i++) { uint64_t reg; From 97fb6931c15cd8d9eedd45bedd716d7b6586513b Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 30 Nov 2024 17:44:04 +0100 Subject: [PATCH 7/8] Revert sys/ucontext.h change --- src/coreclr/nativeaot/Runtime/unix/UnixContext.h | 2 +- src/coreclr/pal/src/configure.cmake | 2 +- src/coreclr/pal/src/include/pal/context.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/nativeaot/Runtime/unix/UnixContext.h b/src/coreclr/nativeaot/Runtime/unix/UnixContext.h index fa54d1d76836f..662b697715da0 100644 --- a/src/coreclr/nativeaot/Runtime/unix/UnixContext.h +++ b/src/coreclr/nativeaot/Runtime/unix/UnixContext.h @@ -4,7 +4,7 @@ #ifndef __UNIX_CONTEXT_H__ #define __UNIX_CONTEXT_H__ -#include +#include // Convert Unix native context to PAL_LIMITED_CONTEXT void NativeContextToPalContext(const void* context, PAL_LIMITED_CONTEXT* palContext); diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 1dfb14f2c4d84..79140466b97d5 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -615,7 +615,7 @@ endif() check_c_source_compiles(" #include -#include +#include int main(int argc, char **argv) { unw_context_t libUnwindContext; diff --git a/src/coreclr/pal/src/include/pal/context.h b/src/coreclr/pal/src/include/pal/context.h index e99abd12b4861..0b44afbcc32c2 100644 --- a/src/coreclr/pal/src/include/pal/context.h +++ b/src/coreclr/pal/src/include/pal/context.h @@ -33,7 +33,7 @@ extern "C" /* A type to wrap the native context type, which is ucontext_t on some * platforms and another type elsewhere. */ #if HAVE_UCONTEXT_T -#include +#include typedef ucontext_t native_context_t; #else // HAVE_UCONTEXT_T From 5a8145993e1373130299d6a2a9f797a1e03cd02a Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 30 Nov 2024 17:44:57 +0100 Subject: [PATCH 8/8] Revert one more change --- src/coreclr/pal/src/include/pal/context.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/pal/src/include/pal/context.h b/src/coreclr/pal/src/include/pal/context.h index 0b44afbcc32c2..5d515a1434e00 100644 --- a/src/coreclr/pal/src/include/pal/context.h +++ b/src/coreclr/pal/src/include/pal/context.h @@ -33,7 +33,9 @@ extern "C" /* A type to wrap the native context type, which is ucontext_t on some * platforms and another type elsewhere. */ #if HAVE_UCONTEXT_T +#if HAVE_UCONTEXT_H #include +#endif // HAVE_UCONTEXT_H typedef ucontext_t native_context_t; #else // HAVE_UCONTEXT_T