From 766532948e883e5ae04d8b34a35f4fa1c78d927e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 26 Oct 2025 21:38:43 +0100
Subject: [PATCH] cmake: SDL_process on unix needs vfork symbol
Current FIL-C toolchains don't have vfork
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ec62ddc5eb64..7472137a2d006 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3461,7 +3461,10 @@ int main(void)
return 0;
}
" HAVE_POSIX_SPAWN)
- if(HAVE_POSIX_SPAWN)
+ if(NOT APPLE)
+ check_symbol_exists(vfork "unistd.h" LIBC_HAS_VFORK)
+ endif()
+ if(HAVE_POSIX_SPAWN AND (APPLE OR LIBC_HAS_VFORK))
sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/process/posix/*.c"
"${SDL3_SOURCE_DIR}/src/process/posix/*.h"