From 65fc564c1691ccda29326ada44219b5f7a0d5ec2 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 1 Sep 2026 04:52:59 +0200 Subject: [PATCH] Added missing header to fix compiler error. (#4396) When compiling today, I had this error on Arch Linux x86-64 due to the missing header. Screenshot from 2026-08-27
22-53-33 Adding the header fixes it. --------- Co-authored-by: Tyler Wilding --- game/kernel/common/codegen.h | 2 +- game/runtime.cpp | 4 ++-- goalc/emitter/IGenARM64.cpp | 3 ++- test/test_emitter_arm64.cpp | 6 +++--- test/test_goal_trampolines_arm64.cpp | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/game/kernel/common/codegen.h b/game/kernel/common/codegen.h index dad04bde7c..0b24beb509 100644 --- a/game/kernel/common/codegen.h +++ b/game/kernel/common/codegen.h @@ -13,7 +13,7 @@ #include "game/runtime.h" #ifdef __APPLE__ -#include +#include "libkern/OSCacheControl.h" #endif /*! diff --git a/game/runtime.cpp b/game/runtime.cpp index b740ab3916..7b274802d4 100644 --- a/game/runtime.cpp +++ b/game/runtime.cpp @@ -9,8 +9,8 @@ #include #if defined(__APPLE__) && defined(__aarch64__) -#include -#include +#include "mach/mach.h" +#include "mach/mach_vm.h" #endif #elif _WIN32 #include diff --git a/goalc/emitter/IGenARM64.cpp b/goalc/emitter/IGenARM64.cpp index b0d38978df..ae46604550 100644 --- a/goalc/emitter/IGenARM64.cpp +++ b/goalc/emitter/IGenARM64.cpp @@ -10,7 +10,8 @@ #include "goalc/emitter/Instruction.h" #include "goalc/emitter/InstructionSet.h" #include "goalc/emitter/Register.h" -#include + +#include "fmt/base.h" // https://armconverter.com/?code=ret // https://developer.arm.com/documentation/ddi0487/latest diff --git a/test/test_emitter_arm64.cpp b/test/test_emitter_arm64.cpp index 08278bce78..4972e86ef3 100644 --- a/test/test_emitter_arm64.cpp +++ b/test/test_emitter_arm64.cpp @@ -1,3 +1,4 @@ +#include #include #include "emitter_test_helpers.h" @@ -6,6 +7,7 @@ #include "common/link_types.h" #include "common/type_system/TypeSystem.h" +#include "capstone/arm.h" #include "goalc/compiler/IR.h" #include "goalc/debugger/DebugInfo.h" #include "goalc/emitter/CodeTester.h" @@ -16,10 +18,8 @@ #include "goalc/regalloc/Allocator.h" #include "goalc/regalloc/Allocator_v2.h" #include "gtest/gtest.h" -#include -#include -#include +#include "fmt/base.h" #include "fmt/format.h" using namespace emitter; diff --git a/test/test_goal_trampolines_arm64.cpp b/test/test_goal_trampolines_arm64.cpp index b6a7880ff4..7db228162c 100644 --- a/test/test_goal_trampolines_arm64.cpp +++ b/test/test_goal_trampolines_arm64.cpp @@ -11,8 +11,8 @@ #include "game/kernel/common/codegen.h" #ifdef __APPLE__ -#include -#include +#include "mach/mach.h" +#include "mach/mach_vm.h" #include #endif