diff --git a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h index 7d6175c6c..4e922fcc9 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h @@ -6,6 +6,19 @@ #include "winapi_stubs.h" #include "DirectXMath/DirectXMath.h" +// The DirectXMath SAL shim defines a few reserved identifiers such as +// `__valid`. Newer libstdc++ headers also use those internal names, so keep +// the shim's macros from leaking past the DirectXMath include. +#ifdef __valid +#undef __valid +#endif +#ifdef __notvalid +#undef __notvalid +#endif +#ifdef __maybevalid +#undef __maybevalid +#endif + using namespace DirectX; typedef struct _RECT { @@ -64,4 +77,4 @@ enum D3D11_COMPARISON_FUNC { D3D11_COMPARISON_ALWAYS = 8 }; -#endif // D3D11STUBS_H \ No newline at end of file +#endif // D3D11STUBS_H