File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
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- #ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
51- #define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir
50+ static inline int php_spawn_addchdir (
51+ posix_spawn_file_actions_t * factions ,
52+ const char * cwd
53+ ) {
54+ #if defined(__APPLE__ )
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 );
5262#else
53- #define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir_np
63+ return posix_spawn_file_actions_addchdir_np ( factions , cwd );
5464#endif
65+ }
66+
67+ #define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR (f , d ) \
68+ php_spawn_addchdir((f), (d))
69+
5570#endif
5671
5772/* This symbol is defined in ext/standard/config.m4.
You can’t perform that action at this time.
0 commit comments