diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 6894b13f07..7b8cb41505 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -27,7 +27,7 @@ #include "endstops.h" #include "stepper.h" -#if HAS_STATUS_MESSAGE +#if ANY(HAS_STATUS_MESSAGE, VALIDATE_HOMING_ENDSTOPS) #include "../lcd/marlinui.h" #endif