SDL: make SDL_syswm.h work with apple's older gcc versions

From b3498a5dc2ca067c39efc9f96b3885e66502c0f0 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 22 Feb 2021 15:50:02 +0300
Subject: [PATCH] make SDL_syswm.h work with apple's older gcc versions

c.f. https://bugzilla.libsdl.org/show_bug.cgi?id=2694
---
 include/SDL_syswm.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index d0c19ba3a..1d1584945 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -256,8 +256,12 @@ struct SDL_SysWMinfo
 #if defined(SDL_VIDEO_DRIVER_COCOA)
         struct
         {
-#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
+#if defined(__OBJC__) && defined(__has_feature)
+        #if __has_feature(objc_arc)
             NSWindow __unsafe_unretained *window; /**< The Cocoa window */
+        #else
+            NSWindow *window;                     /**< The Cocoa window */
+        #endif
 #else
             NSWindow *window;                     /**< The Cocoa window */
 #endif
@@ -266,8 +270,12 @@ struct SDL_SysWMinfo
 #if defined(SDL_VIDEO_DRIVER_UIKIT)
         struct
         {
-#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
+#if defined(__OBJC__) && defined(__has_feature)
+        #if __has_feature(objc_arc)
             UIWindow __unsafe_unretained *window; /**< The UIKit window */
+        #else
+            UIWindow *window;                     /**< The UIKit window */
+        #endif
 #else
             UIWindow *window;                     /**< The UIKit window */
 #endif