diff --git a/src/web/MagConfig.cc b/src/web/MagConfig.cc index 8691cde0..d07cf41b 100644 --- a/src/web/MagConfig.cc +++ b/src/web/MagConfig.cc @@ -18,7 +18,15 @@ #include "Value.h" -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) +#define STD_FILESYSTEM_INCLUDE_MISSING 0 +#ifdef __has_include + #if !__has_include() + #define STD_FILESYSTEM_INCLUDE_MISSING 1 + #endif +#endif + + +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (__cplusplus >= 201703L) && !STD_FILESYSTEM_INCLUDE_MISSING) #include namespace fs = std::filesystem; #else @@ -579,4 +587,4 @@ bool PaletteLibrary::find(string& name, Palette& out) { } return false; -} \ No newline at end of file +}