mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Merge topic 'libuv-macos-10.5'
e3e2ef1964 libuv: Avoid posix_spawn on macOS < 10.8
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9371
This commit is contained in:
@@ -37,7 +37,11 @@
|
||||
#include <sched.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
# include <spawn.h>
|
||||
/* macOS 10.8 and later have a working posix_spawn */
|
||||
# if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
|
||||
# define UV_USE_APPLE_POSIX_SPAWN
|
||||
# include <spawn.h>
|
||||
# endif
|
||||
# include <paths.h>
|
||||
# include <sys/kauth.h>
|
||||
# include <sys/types.h>
|
||||
@@ -430,7 +434,7 @@ static void uv__process_child_init(const uv_process_options_t* options,
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(UV_USE_APPLE_POSIX_SPAWN)
|
||||
typedef struct uv__posix_spawn_fncs_tag {
|
||||
struct {
|
||||
int (*addchdir_np)(const posix_spawn_file_actions_t *, const char *);
|
||||
@@ -882,7 +886,7 @@ static int uv__spawn_and_init_child(
|
||||
int exec_errorno;
|
||||
ssize_t r;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(UV_USE_APPLE_POSIX_SPAWN)
|
||||
uv_once(&posix_spawn_init_once, uv__spawn_init_posix_spawn);
|
||||
|
||||
/* Special child process spawn case for macOS Big Sur (11.0) onwards
|
||||
|
||||
Reference in New Issue
Block a user