From 58010c57473d8a576195046e26f4f79499361fa6 Mon Sep 17 00:00:00 2001 From: Tulio A M Mendes Date: Tue, 10 Feb 2026 01:30:39 -0300 Subject: [PATCH] refactor: guard multiboot2.h include in pmm.c with #if x86 multiboot2.h is an x86/GRUB boot protocol header. pmm.c (generic mm/ code) included it unconditionally even though all Multiboot2 usage is already inside #if x86 blocks. Guard the include so it is not pulled in on ARM/RISC-V/MIPS builds. Passes: make, cppcheck, QEMU smoke test. --- src/mm/pmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mm/pmm.c b/src/mm/pmm.c index 5a81163..8410cb8 100644 --- a/src/mm/pmm.c +++ b/src/mm/pmm.c @@ -1,5 +1,7 @@ #include "pmm.h" +#if defined(__i386__) || defined(__x86_64__) #include "multiboot2.h" +#endif #include "utils.h" #include "uart_console.h" #include "hal/cpu.h" -- 2.43.0