From f94293f1216f4843dcba87c8809f17cb619e154f Mon Sep 17 00:00:00 2001 From: "Jakub V. Flasar" <38976370+Kubiisek@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:45:38 +0100 Subject: [PATCH] Kernel: Create a stub mcontext for aarch64 The struct only has a stub integer so that the size is the same for C and C++. Something caught by CLion. This commit was made with mrkct's help! --- Kernel/Arch/aarch64/mcontext.h | 22 ++++++++++++++++++++++ Kernel/Arch/mcontext.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Kernel/Arch/aarch64/mcontext.h diff --git a/Kernel/Arch/aarch64/mcontext.h b/Kernel/Arch/aarch64/mcontext.h new file mode 100644 index 00000000000..c4ebbabab18 --- /dev/null +++ b/Kernel/Arch/aarch64/mcontext.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2022, the SerenityOS developers. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct __attribute__((packed)) __mcontext { + int stub; +}; + +#ifdef __cplusplus +} +#endif diff --git a/Kernel/Arch/mcontext.h b/Kernel/Arch/mcontext.h index ee62f487bd3..ff9aa4b5aeb 100644 --- a/Kernel/Arch/mcontext.h +++ b/Kernel/Arch/mcontext.h @@ -11,5 +11,5 @@ #if ARCH(X86_64) || ARCH(I386) # include #elif ARCH(AARCH64) -# error "Unknown architecture" +# include #endif