diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 56ec11bd7c..bcee642368 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -21,6 +21,10 @@ */ #pragma once +#if !defined(__has_include) + #define __has_include(...) 1 +#endif + #define ABCE 4 #define XYZE 4 #define ABC 3 diff --git a/Marlin/src/inc/MarlinConfigPre.h b/Marlin/src/inc/MarlinConfigPre.h index 1385f9e19f..d84f751200 100644 --- a/Marlin/src/inc/MarlinConfigPre.h +++ b/Marlin/src/inc/MarlinConfigPre.h @@ -37,12 +37,8 @@ #include "../../Configuration.h" #ifdef CUSTOM_VERSION_FILE - #if defined(__has_include) - #if __has_include(XSTR(../../CUSTOM_VERSION_FILE)) - #include XSTR(../../CUSTOM_VERSION_FILE) - #endif - #else - #include XSTR(../../CUSTOM_VERSION_FILE) + #if __has_include(STRINGIFY(../../CUSTOM_VERSION_FILE)) + #include STRINGIFY(../../CUSTOM_VERSION_FILE) #endif #endif