From ef52560a2494217b8c6f0c3ea230f5e3863f14a0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 9 Feb 2021 15:10:06 -0800 Subject: [PATCH] Fixed bug 5539 - Clang 11 fails to compile a CMake build with conflicting types for _m_prefetchw vladius In SDL_cpuinfo.h it seems like is not included when __clang__ is defined, as the comment in the file explicitly reads: "Many of the intrinsics SDL uses are not implemented by clang with Visual Studio" However, the SDL_endian.h header does include without any precautions like: >#ifdef _MSC_VER >#include >#endif Maybe it should be changed to something like: >#ifdef _MSC_VER >#ifndef __clang__ >#include >#endif >#endif --- include/SDL_endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL_endian.h b/include/SDL_endian.h index 4534cad44..f9a4fd368 100644 --- a/include/SDL_endian.h +++ b/include/SDL_endian.h @@ -30,7 +30,7 @@ #include "SDL_stdinc.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) #include #endif