Skip to content

Avoid duplicate definition of CONTEXT_UNWOUND_TO_CALL with SDK v10.0.28000.0#5866

Merged
hoyosjs merged 1 commit into
mainfrom
fix/crosscomp-context-unwound-to-call
Jun 8, 2026
Merged

Avoid duplicate definition of CONTEXT_UNWOUND_TO_CALL with SDK v10.0.28000.0#5866
hoyosjs merged 1 commit into
mainfrom
fix/crosscomp-context-unwound-to-call

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Note

This PR was AI/Copilot-generated.

This macro is now defined by the Windows SDK on v10.0.28000.0 or later, so we need to guard against the redefinition to avoid a build error when compiling with /WX.

Adds #ifndef/#endif guards around the three unguarded #define CONTEXT_UNWOUND_TO_CALL sites (ARM64, LOONGARCH64, RISCV64 cross-compilation sections). The ARM section already had guards.

Port of dotnet/runtime#127161.

…28000.0

This macro is now defined by the Windows SDK if on v10.0.28000.0 or
later, so we need to avoid the redefinition error.

Port of dotnet/runtime#127161.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 8, 2026 14:56
@max-charlamb max-charlamb requested a review from a team as a code owner June 8, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents /WX build breaks with Windows SDK v10.0.28000.0+ by avoiding duplicate macro definitions of CONTEXT_UNWOUND_TO_CALL in crosscomp.h during cross-compilation scenarios.

Changes:

  • Wrapped three previously unguarded #define CONTEXT_UNWOUND_TO_CALL sites with #ifndef/#endif (ARM64, LOONGARCH64, RISCV64 cross-compilation blocks).
  • Aligns these sections with the existing guarded pattern already used elsewhere in the file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@max-charlamb

Copy link
Copy Markdown
Member Author

@max-charlamb max-charlamb enabled auto-merge (squash) June 8, 2026 17:25
@hoyosjs hoyosjs disabled auto-merge June 8, 2026 17:30
@hoyosjs hoyosjs merged commit f224119 into main Jun 8, 2026
15 of 19 checks passed
@hoyosjs hoyosjs deleted the fix/crosscomp-context-unwound-to-call branch June 8, 2026 17:37
@hoyosjs hoyosjs mentioned this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants