sdl12-compat: updated SDL_platform.h from latest SDL2.

From 75ac6c6e39cf897d30958c603e004bc0d1cbfa63 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 15 Dec 2024 00:37:02 +0300
Subject: [PATCH] updated SDL_platform.h from latest SDL2.

---
 include/SDL/SDL_platform.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/SDL/SDL_platform.h b/include/SDL/SDL_platform.h
index 9b27621e0..9e667b8e4 100644
--- a/include/SDL/SDL_platform.h
+++ b/include/SDL/SDL_platform.h
@@ -75,7 +75,13 @@ requirement is dropped too. Send patches. :) */
 #if defined(__APPLE__)
 /* lets us know what version of Mac OS X we're compiling on */
 #include <AvailabilityMacros.h>
+#ifndef __has_extension /* Older compilers don't support this */
+#define __has_extension(x) 0
 #include <TargetConditionals.h>
+#undef __has_extension
+#else
+#include <TargetConditionals.h>
+#endif
 
 /* Fix building with older SDKs that don't define these
    See this for more information: