From 81f2f4484392883e6ecbb2f4b04c99c0174d6bff Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 15 Sep 2025 19:28:28 +0300 Subject: [PATCH] SDL_endian.h: don't add _m_prefetch hack for clang-cl if available as a builtin Fixes: https://github.com/libsdl-org/SDL/issues/13952 . --- include/SDL3/SDL_endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL3/SDL_endian.h b/include/SDL3/SDL_endian.h index 41ad0ce51a..f3ab18ffdc 100644 --- a/include/SDL3/SDL_endian.h +++ b/include/SDL3/SDL_endian.h @@ -46,7 +46,7 @@ #if defined(_MSC_VER) && (_MSC_VER >= 1400) /* 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. */ -#ifdef __clang__ +#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch) #ifndef __PRFCHWINTRIN_H #define __PRFCHWINTRIN_H static __inline__ void __attribute__((__always_inline__, __nodebug__))