Addendum to commit
de81021ba.
Otherwise, we get the following build error:
\ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
PtrToUL64(RtlpBreakWithStatusInstruction),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
#define PtrToUL64(x) ((ULPTR64)(x))
^~~~~~~~~~~~
C_ASSERT(sizeof(KDDEBUGGER_DATA64) >= 0x318);
#endif
C_ASSERT(sizeof(KDDEBUGGER_DATA64) >= 0x318);
#endif
-/* Minimal hackery for GCC, see commit b9cd3f2d9 (r25845) */
-#if defined(__GNUC__) && defined(_M_IX86)
+#if !defined(_WIN64) && (defined(__GNUC__) || defined(__clang__))
+/* Minimal hackery for GCC/Clang, see commit b9cd3f2d9 (r25845) and de81021ba */
#define PtrToUL64(x) ((ULPTR64)(ULONG_PTR)(x))
#else
#define PtrToUL64(x) ((ULPTR64)(x))
#define PtrToUL64(x) ((ULPTR64)(ULONG_PTR)(x))
#else
#define PtrToUL64(x) ((ULPTR64)(x))
} DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64;
/* Self-documenting type: stores a pointer as a 64-bit quantity */
} DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64;
/* Self-documenting type: stores a pointer as a 64-bit quantity */
-#if defined(__GNUC__) && defined(_M_IX86) // See commit b9cd3f2d9 (r25845)
+#if !defined(_WIN64) && (defined(__GNUC__) || defined(__clang__))
+/* Minimal hackery for GCC/Clang, see commit b9cd3f2d9 (r25845) and de81021ba */
typedef union _ULPTR64
{
ULONG_PTR ptr;
typedef union _ULPTR64
{
ULONG_PTR ptr;