summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2024-12-08 23:56:06 -0800
committerrcombs <rcombs@rcombs.me>2024-12-12 13:48:35 -0800
commita4e8e16ff27fcf380a5b2e5efb337b7398878b34 (patch)
treeb0e1d37b103e02a4df9c0c5711a49578ef0435d9
parent6b3a9eef7ee8d9083c32ac96903a787c5ab0ec3a (diff)
downloadlibass-a4e8e16ff27fcf380a5b2e5efb337b7398878b34.tar.bz2
libass-a4e8e16ff27fcf380a5b2e5efb337b7398878b34.tar.xz
checkasm: fix build on win64
-rw-r--r--checkasm/checkasm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/checkasm/checkasm.h b/checkasm/checkasm.h
index c07491f1..3cd7c248 100644
--- a/checkasm/checkasm.h
+++ b/checkasm/checkasm.h
@@ -35,6 +35,10 @@
#include <stdint.h>
#include <stdlib.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
#if !ARCH_X86_64 || !defined(_WIN32)
#include <setjmp.h>
#define checkasm_context jmp_buf
@@ -43,7 +47,6 @@
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* setjmp/longjmp on 64-bit Windows will try to use SEH to unwind the stack,
* which doesn't work for assembly functions without unwind information. */
-#include <windows.h>
#define checkasm_context CONTEXT
#define checkasm_save_context() RtlCaptureContext(&checkasm_context_buf)
#define checkasm_load_context() RtlRestoreContext(&checkasm_context_buf, NULL)