From 607f37dafde2f7a76bd17a51535dcd5b99070015 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 27 May 2024 14:33:18 -0700 Subject: [PATCH] Fixed compiling SDL_platform_defines.h on macOS with older compilers (thanks @sezero!) Fixes #9632 (cherry picked from commit 36015ad5e58c413e8a101c48ed2bdbcdd044c868) (cherry picked from commit 8bc47dc3f155f4dd2f01b7f63ef32a45f620f70c) --- include/SDL_platform.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/SDL_platform.h b/include/SDL_platform.h index e8bf11acfd..2b11bf2016 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -73,7 +73,13 @@ #if defined(__APPLE__) /* lets us know what version of Mac OS X we're compiling on */ #include +#ifndef __has_extension /* Older compilers don't support this */ +#define __has_extension(x) 0 #include +#undef __has_extension +#else +#include +#endif /* Fix building with older SDKs that don't define these See this for more information: