File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 4747#define USE_POSIX_SPAWN
4848
4949/* The non-_np variant is in macOS 26 (and _np deprecated) */
50+ #if defined(__APPLE__ ) && defined(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR ) && \
51+ defined(MAC_OS_X_VERSION_MIN_REQUIRED ) && MAC_OS_X_VERSION_MIN_REQUIRED >= 260000
52+ #define USE_ADDCHDIR posix_spawn_file_actions_addchdir
53+ #else
54+ #define USE_ADDCHDIR posix_spawn_file_actions_addchdir_np
55+ #endif
56+
5057static inline int php_spawn_addchdir (
5158 posix_spawn_file_actions_t * factions ,
5259 const char * cwd
5360) {
54- #if defined(__APPLE__ ) && defined(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR )
55- if (__builtin_available (macOS 26.0 , * )) {
56- return posix_spawn_file_actions_addchdir (factions , cwd );
57- } else {
58- return posix_spawn_file_actions_addchdir_np (factions , cwd );
59- }
60- #elif defined(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR )
61- return posix_spawn_file_actions_addchdir (factions , cwd );
62- #else
63- return posix_spawn_file_actions_addchdir_np (factions , cwd );
64- #endif
61+ return USE_ADDCHDIR (factions , cwd );
6562}
6663
6764#define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR (f , d ) \
You can’t perform that action at this time.
0 commit comments