Fix compile error

This commit is contained in:
Huang Xin 2022-05-25 22:10:32 +08:00
parent 7f9b5b7885
commit 436d5cb956
2 changed files with 10 additions and 1 deletions

View File

@ -183,7 +183,7 @@ static void addDefaultSeedLocked() {
seedsPool.push_front((uint32_t)timeSeed); // lower 32bits of current time seedsPool.push_front((uint32_t)timeSeed); // lower 32bits of current time
seedsPool.push_front(rd()); // random device seedsPool.push_front(rd()); // random device
seedsPool.push_front( seedsPool.push_front(
reinterpret_cast<std::intptr_t>(&timeSeed)); // lower 32bits of memory address of temporary variable reinterpret_cast<std::uintmax_t>(&timeSeed)); // lower 32bits of memory address of temporary variable
if (seedsPool.size() > MAX_SEEDS_POOL_SIZE) { if (seedsPool.size() > MAX_SEEDS_POOL_SIZE) {
seedsPool.resize(MAX_SEEDS_POOL_SIZE); seedsPool.resize(MAX_SEEDS_POOL_SIZE);

View File

@ -4,6 +4,15 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(AlexaClientSDK VERSION 1.26.0 LANGUAGES CXX) project(AlexaClientSDK VERSION 1.26.0 LANGUAGES CXX)
set(PROJECT_BRIEF "A cross-platform, modular SDK for interacting with the Alexa Voice Service") set(PROJECT_BRIEF "A cross-platform, modular SDK for interacting with the Alexa Voice Service")
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
# This variable should be used by extension packages to include cmake files from this project. # This variable should be used by extension packages to include cmake files from this project.
get_filename_component(AVS_CORE . ABSOLUTE) get_filename_component(AVS_CORE . ABSOLUTE)
get_filename_component(AVS_CORE_BINARY ${PROJECT_BINARY_DIR} ABSOLUTE) get_filename_component(AVS_CORE_BINARY ${PROJECT_BINARY_DIR} ABSOLUTE)