From a7a71be1131554700f0ff6f9b4a4ca200dd40649 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 12 Oct 2022 22:19:01 +0200 Subject: [PATCH] LibC: Fix some compiler errors __x86_64__ isn't defined at all on AARCH64. --- Userland/Libraries/LibC/setjmp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibC/setjmp.h b/Userland/Libraries/LibC/setjmp.h index 2c998b4237..3b4c7d9a75 100644 --- a/Userland/Libraries/LibC/setjmp.h +++ b/Userland/Libraries/LibC/setjmp.h @@ -26,7 +26,7 @@ struct __jmp_buf { uint32_t ebp; uint32_t esp; uint32_t eip; -#elif __x86_64__ +#elif defined(__x86_64__) uint64_t rbx; uint64_t r12; uint64_t r13; @@ -35,7 +35,7 @@ struct __jmp_buf { uint64_t rbp; uint64_t rsp; uint64_t rip; -#elif __aarch64__ +#elif defined(__aarch64__) // FIXME: This is likely incorrect. uint64_t regs[22]; #else @@ -54,9 +54,9 @@ typedef struct __jmp_buf sigjmp_buf[1]; #ifdef __cplusplus # ifdef __i386__ static_assert(sizeof(struct __jmp_buf) == 32, "struct __jmp_buf unsynchronized with i386/setjmp.S"); -# elif __x86_64__ +# elif defined(__x86_64__) static_assert(sizeof(struct __jmp_buf) == 72, "struct __jmp_buf unsynchronized with x86_64/setjmp.S"); -# elif __aarch64__ +# elif defined(__aarch64__) static_assert(sizeof(struct __jmp_buf) == 184, "struct __jmp_buf unsynchronized with aarch64/setjmp.S"); # else # error