From: Tulio A M Mendes Date: Tue, 10 Feb 2026 04:30:39 +0000 (-0300) Subject: refactor: guard multiboot2.h include in pmm.c with #if x86 X-Git-Url: https://projects.tadryanom.me/docs/POSIX_ROADMAP.md?a=commitdiff_plain;h=58010c57473d8a576195046e26f4f79499361fa6;p=AdrOS.git 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. --- 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"