Skip to content

Commit 0e41b35

Browse files
Avoid adding crosscomp.h for NativeAOT builds to avoid redef warnings for macros like CONTEXT_UNWOUND_TO_CALL
1 parent 0910b0a commit 0e41b35

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

src/coreclr/unwinder/arm64/unwinder.cpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,33 @@
55

66
#if defined(NATIVEAOT)
77
#include "common.h"
8+
#include <windows.h>
9+
#include "rhassert.h"
10+
11+
#ifndef T_CONTEXT
12+
#define T_CONTEXT CONTEXT
13+
#endif
14+
#ifndef PT_CONTEXT
15+
#define PT_CONTEXT PCONTEXT
16+
#endif
17+
#ifndef T_KNONVOLATILE_CONTEXT_POINTERS
18+
#define T_KNONVOLATILE_CONTEXT_POINTERS KNONVOLATILE_CONTEXT_POINTERS
19+
#endif
20+
#ifndef PT_KNONVOLATILE_CONTEXT_POINTERS
21+
#define PT_KNONVOLATILE_CONTEXT_POINTERS PKNONVOLATILE_CONTEXT_POINTERS
22+
#endif
23+
#ifndef T_RUNTIME_FUNCTION
24+
#define T_RUNTIME_FUNCTION RUNTIME_FUNCTION
25+
#endif
26+
#ifndef PT_RUNTIME_FUNCTION
27+
#define PT_RUNTIME_FUNCTION PRUNTIME_FUNCTION
28+
#endif
829
#else
930
#include "stdafx.h"
1031
#include "utilcode.h"
32+
#include "crosscomp.h"
1133
#endif
1234

13-
#include "crosscomp.h"
1435
#include "clrnt.h"
1536
#include "unwinder.h"
1637

0 commit comments

Comments
 (0)