From a7b9a625bec480db0b2b26f3d5d8d567cbb06076 Mon Sep 17 00:00:00 2001
From: anonymouspage <123-anonymouspage@users.noreply.gitlab.synchro.net>
Date: Tue, 18 Oct 2022 09:49:49 -0700
Subject: [PATCH] Do not define Darwin SDL entrypoints if SDL is disabled

The SDL related initialization functions should only be
compiled in if SDL has also been enabled in the build.
This was discovered after getting build errors on macOS
with SDL disabled.
---
 src/conio/ciolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conio/ciolib.c b/src/conio/ciolib.c
index dbe5f3360f..a081c00240 100644
--- a/src/conio/ciolib.c
+++ b/src/conio/ciolib.c
@@ -1886,7 +1886,7 @@ CIOLIBEXPORT enum ciolib_codepage ciolib_getcodepage(void)
 	return conio_fontdata[font].cp;
 }
 
-#if defined(__DARWIN__)
+#if defined(__DARWIN__) && defined(WITH_SDL)
 #ifdef main
 #undef main
 #endif
-- 
GitLab