diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
index 76661337f..65db79baa 100644
--- a/grub-core/kern/emu/misc.c
+++ b/grub-core/kern/emu/misc.c
@@ -16,7 +16,9 @@
* along with GRUB. If not, see .
*/
+#ifndef GRUB_BUILD
#include
+#endif
#include
#include