From e0307aa05e79284a45a535b3e78728e7c42239cf Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 17 Mar 2026 17:01:10 +0300 Subject: [PATCH] apply issue/#13952 fix to SDL_cpuinfo.h, too. --- include/SDL_cpuinfo.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h index ce13eb5bc6..f8f2d81d8c 100644 --- a/include/SDL_cpuinfo.h +++ b/include/SDL_cpuinfo.h @@ -39,21 +39,19 @@ /* Need to do this here because intrin.h has C++ code in it */ /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */ #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64)) -#ifdef __clang__ /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version, so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */ - +#if defined(__clang__) && !_SDL_HAS_BUILTIN(_m_prefetch) #ifndef __PRFCHWINTRIN_H #define __PRFCHWINTRIN_H - static __inline__ void __attribute__((__always_inline__, __nodebug__)) _m_prefetch(void *__P) { - __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */); + __builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */); } - #endif /* __PRFCHWINTRIN_H */ #endif /* __clang__ */ + #include #ifndef _WIN64 #ifndef __MMX__