:: commit 312b8e20a34c5ee998fabd97a7e9d023a8194f4a

Mintsuki <mintsuki@protonmail.com> — 2025-09-21 07:24

parents: 83b6d7816d

misc: Gate sys/idt.h as a whole behind x86 check

diff --git a/common/entry.s2.c b/common/entry.s2.c
index b553083c..9de0697f 100644
--- a/common/entry.s2.c
+++ b/common/entry.s2.c
@@ -21,9 +21,7 @@
 #include <pxe/pxe.h>
 #include <pxe/tftp.h>
 #include <drivers/disk.h>
-#if defined (__x86_64__) || defined (__i386__)
-#  include <sys/idt.h>
-#endif
+#include <sys/idt.h>
 #include <sys/cpu.h>
 
 struct volume *boot_volume;
diff --git a/common/sys/idt.h b/common/sys/idt.h
index d3a74ad2..e9c2a074 100644
--- a/common/sys/idt.h
+++ b/common/sys/idt.h
@@ -1,6 +1,8 @@
 #ifndef SYS__IDT_H__
 #define SYS__IDT_H__
 
+#if defined (__x86_64__) || defined (__i386__)
+
 #include <stdint.h>
 #include <stddef.h>
 
@@ -58,3 +60,5 @@ void idt_register_isr(size_t vec, void *handler, uint8_t type);
 void flush_irqs(void);
 
 #endif
+
+#endif
tab: 248 wrap: offon