Commit 7c90567a authored by Ben Noordhuis's avatar Ben Noordhuis Committed by V8 LUCI CQ

[base] fix glibc 2.34 build

PTHREAD_STACK_MIN is an alias for __sysconf(__SC_THREAD_STACK_MIN_VALUE)
in glibc 2.34.

__sysconf() returns long, causing a -Werror,-Wsign-compare error build
error.

Change-Id: I15da8e7ee57a6979682ff7166990698965481586
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3301464
Commit-Queue: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78097}
parent d1538091
......@@ -840,9 +840,8 @@ Thread::Thread(const Options& options)
: data_(new PlatformData),
stack_size_(options.stack_size()),
start_semaphore_(nullptr) {
if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < PTHREAD_STACK_MIN) {
stack_size_ = PTHREAD_STACK_MIN;
}
const int min_stack_size = static_cast<int>(PTHREAD_STACK_MIN);
if (stack_size_ > 0) stack_size_ = std::max(stack_size_, min_stack_size);
set_name(options.name());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment