소스 검색

Fixed compiling SDL_platform_defines.h on macOS with older compilers (thanks @sezero!)

Fixes #9632

(cherry picked from commit 36015ad5e58c413e8a101c48ed2bdbcdd044c868)
Sam Lantinga 1 년 전
부모
커밋
8bc47dc3f1
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      include/SDL_platform.h

+ 6 - 0
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 <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: