From e7ea47a1b4ab6a9896544ebb72961404045bb45c Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 3 Feb 2023 17:40:40 +0300
Subject: [PATCH] add version check to SDL_MALLOC macro (for correctness)
---
include/SDL3/SDL_begin_code.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/SDL3/SDL_begin_code.h b/include/SDL3/SDL_begin_code.h
index 2657a7852fba..b6d30b521d80 100644
--- a/include/SDL3/SDL_begin_code.h
+++ b/include/SDL3/SDL_begin_code.h
@@ -170,12 +170,12 @@
#endif /* SDL_FALLTHROUGH not defined */
#ifndef SDL_MALLOC
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (__GNUC__ >= 3)
#define SDL_MALLOC __attribute__((malloc))
-/* FIXME
+/** FIXME
#elif defined(_MSC_VER)
#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
-*/
+**/
#else
#define SDL_MALLOC
#endif