diff options
author | Brad King <brad.king@kitware.com> | 2018-03-05 14:18:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-05 14:21:31 (GMT) |
commit | c5428d8db2aebb215b418d72eae99f4a106a82b0 (patch) | |
tree | ed892d71dc447c2f04c59a0f1da569c3193923d2 /Utilities | |
parent | 24de561a1a7529b919215edb0322279449c5e6c0 (diff) | |
download | CMake-c5428d8db2aebb215b418d72eae99f4a106a82b0.zip CMake-c5428d8db2aebb215b418d72eae99f4a106a82b0.tar.gz CMake-c5428d8db2aebb215b418d72eae99f4a106a82b0.tar.bz2 |
libuv: disable process affinity during CMake bootstrap
Avoid depending on platform-specific pthread features during bootstrap.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibuv/src/unix/process.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/unix/process.c b/Utilities/cmlibuv/src/unix/process.c index d7b6ad3..47ab1dc 100644 --- a/Utilities/cmlibuv/src/unix/process.c +++ b/Utilities/cmlibuv/src/unix/process.c @@ -45,6 +45,7 @@ extern char **environ; # include <grp.h> #endif +#ifndef CMAKE_BOOTSTRAP #if defined(__linux__) # define uv__cpu_set_t cpu_set_t #elif defined(__FreeBSD__) @@ -53,6 +54,7 @@ extern char **environ; # include <pthread_np.h> # define uv__cpu_set_t cpuset_t #endif +#endif static void uv__chld(uv_signal_t* handle, int signum) { uv_process_t* process; @@ -294,12 +296,14 @@ static void uv__process_child_init(const uv_process_options_t* options, int err; int fd; int n; +#ifndef CMAKE_BOOTSTRAP #if defined(__linux__) || defined(__FreeBSD__) int r; int i; int cpumask_size; uv__cpu_set_t cpuset; #endif +#endif if (options->flags & UV_PROCESS_DETACHED) setsid(); @@ -390,6 +394,7 @@ static void uv__process_child_init(const uv_process_options_t* options, _exit(127); } +#ifndef CMAKE_BOOTSTRAP #if defined(__linux__) || defined(__FreeBSD__) if (options->cpumask != NULL) { cpumask_size = uv_cpumask_size(); @@ -409,6 +414,7 @@ static void uv__process_child_init(const uv_process_options_t* options, } } #endif +#endif if (options->env != NULL) { environ = options->env; @@ -465,6 +471,7 @@ int uv_spawn(uv_loop_t* loop, int status; if (options->cpumask != NULL) { +#ifndef CMAKE_BOOTSTRAP #if defined(__linux__) || defined(__FreeBSD__) if (options->cpumask_size < (size_t)uv_cpumask_size()) { return UV_EINVAL; @@ -472,6 +479,9 @@ int uv_spawn(uv_loop_t* loop, #else return UV_ENOTSUP; #endif +#else + return UV_ENOTSUP; +#endif } assert(options->file != NULL); |