소스 검색

Use posix_spawn_file_actions_addchdir_np() on macOS

posix_spawn_file_actions_addchdir() was introduced in macOS 26, but we want to be able to run on systems all the way back to macOS 15
Sam Lantinga 8 시간 전
부모
커밋
9e0549d8ff
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/process/posix/SDL_posixprocess.c

+ 1 - 1
src/process/posix/SDL_posixprocess.c

@@ -203,7 +203,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
 #ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
 #ifdef SDL_PLATFORM_APPLE
         if (__builtin_available(macOS 10.15, *)) {
-            if (posix_spawn_file_actions_addchdir(&fa, working_directory) != 0) {
+            if (posix_spawn_file_actions_addchdir_np(&fa, working_directory) != 0) {
                 SDL_SetError("posix_spawn_file_actions_addchdir failed: %s", strerror(errno));
                 goto posix_spawn_fail_all;
             }