diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index ddce144161ca..319f11fd1e72 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -1,14 +1,12 @@ /* +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | + | Copyright © The PHP Group and Contributors. | +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | https://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | + | This source file is subject to the Modified BSD License that is | + | bundled with this package in the file LICENSE, and is available | + | through the World Wide Web at . | + | | + | SPDX-License-Identifier: BSD-3-Clause | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ @@ -44,10 +42,17 @@ * to be really buggy. */ #include +#ifdef __APPLE__ +#include +#endif #define USE_POSIX_SPAWN /* The non-_np variant is in macOS 26 (and _np deprecated) */ -#ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR +#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 260000 +#define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir +#elif defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED < 260000 +#define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir_np +#elif HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR #define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir #else #define POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR posix_spawn_file_actions_addchdir_np @@ -1573,4 +1578,4 @@ PHP_FUNCTION(proc_open) } /* }}} */ -#endif /* PHP_CAN_SUPPORT_PROC_OPEN */ +#endif /* PHP_CAN_SUPPORT_PROC_OPEN */ \ No newline at end of file