From 08352556c745a8bed0d44da8cb3c2a66d8a013ee Mon Sep 17 00:00:00 2001 From: Tulio A M Mendes Date: Thu, 5 Feb 2026 21:54:33 -0300 Subject: [PATCH] kernel/mm: fix WSL build (cross-compiler guard, utils, heap includes) --- src/kernel/main.c | 2 +- src/kernel/utils.c | 6 ------ src/mm/heap.c | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/kernel/main.c b/src/kernel/main.c index e53b2935..ee61184e 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -31,7 +31,7 @@ /* Check if the compiler thinks we are targeting the wrong operating system. */ #if defined(__linux__) -#error "You are not using a cross-compiler, you will run into trouble" +#warning "You are not using a cross-compiler, you may run into trouble" #endif /* diff --git a/src/kernel/utils.c b/src/kernel/utils.c index 26c1f43f..d8fcee2f 100644 --- a/src/kernel/utils.c +++ b/src/kernel/utils.c @@ -116,12 +116,6 @@ int atoi(const char* str) { return sign * res; } -char* strcpy(char* dest, const char* src) { - char* temp = dest; - while ((*dest++ = *src++)); - return temp; -} - void itoa_hex(uint32_t num, char* str) { const char hex_chars[] = "0123456789ABCDEF"; str[0] = '0'; diff --git a/src/mm/heap.c b/src/mm/heap.c index 60f9c9a8..af4a210c 100644 --- a/src/mm/heap.c +++ b/src/mm/heap.c @@ -10,6 +10,7 @@ #include "heap.h" #include "uart_console.h" #include "pmm.h" +#include "vmm.h" #include "spinlock.h" #include "hal/cpu.h" #include -- 2.43.0