SDL: Don't try to use SDL platform macros in configure-time checks

From a06ee5b98df399181676e36a2d6d837711e2089b Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 24 Jan 2024 10:40:04 +0000
Subject: [PATCH] Don't try to use SDL platform macros in configure-time checks

At the point that we run this, nothing SDL-specific is set up yet.
__APPLE__ is a compiler predefined macro that forms part of the API on
Apple platforms, so it's fine to rely on it.

This partially reverts commit 31d133db.

Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 cmake/sdlchecks.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index b40464210416..c91df3f395e2 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -849,7 +849,7 @@ macro(CheckPTHREAD)
         check_c_source_compiles("
             #include <pthread.h>
             int main(int argc, char **argv) {
-              #ifdef SDL_PLATFORM_APPLE
+              #ifdef __APPLE__
               pthread_setname_np(\"\");
               #else
               pthread_setname_np(pthread_self(),\"\");