SDL: The alloc_size attribute isn't supported in clang 3.x

From 5dd07a577388505c9b51ab3c8cd6e6e1b7365486 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 6 Jan 2023 12:10:21 -0800
Subject: [PATCH] The alloc_size attribute isn't supported in clang 3.x

---
 include/SDL3/SDL_begin_code.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/SDL3/SDL_begin_code.h b/include/SDL3/SDL_begin_code.h
index 5f77da84b6d3..7f7c2dc76c24 100644
--- a/include/SDL3/SDL_begin_code.h
+++ b/include/SDL3/SDL_begin_code.h
@@ -182,7 +182,7 @@
 #endif /* SDL_MALLOC not defined */
 
 #ifndef SDL_ALLOC_SIZE
-#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
 #define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
 #elif defined(_MSC_VER)
 #define SDL_ALLOC_SIZE(p)
@@ -192,7 +192,7 @@
 #endif /* SDL_ALLOC_SIZE not defined */
 
 #ifndef SDL_ALLOC_SIZE2
-#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
 #define SDL_ALLOC_SIZE2(p1, p2) __attribute__((alloc_size(p1, p2)))
 #elif defined(_MSC_VER)
 #define SDL_ALLOC_SIZE2(p1, p2)