Closed cherishman2005 closed 9 months ago
编译错误。编译指令:mediasoup-sfu-cpp-main/deps/libwebrtc/deps/abseil-cpp# ./build.sh
/data/services/kfrtc/bin/mediasoup-sfu-cpp-main/deps/libwebrtc/deps/abseil-cpp/absl/debugging/failure_signal_handler.cc: In function 'bool absl::SetupAlternateStackOnce()':
/data/services/kfrtc/bin/mediasoup-sfu-cpp-main/deps/libwebrtc/deps/abseil-cpp/absl/debugging/failure_signal_handler.cc:127:32: error: no matching function for call to 'max(long int, int)'
127 | size_t stack_size = (std::max(SIGSTKSZ, 65536 ) + page_mask) & ~page_mask;
修改代码
size_t stack_size = (std::max(SIGSTKSZ, 65536L ) + page_mask) & ~page_mask;
或者
size_t stack_size = (std::max(static_cast<size_t>(SIGSTKSZ), size_t{65536}) + page_mask) & ~page_mask;
参见 https://github.com/abseil/abseil-cpp/blob/master/absl/debugging/failure_signal_handler.cc