diff --git a/external/toxcore/CMakeLists.txt b/external/toxcore/CMakeLists.txt index 9fea9344..fae83720 100644 --- a/external/toxcore/CMakeLists.txt +++ b/external/toxcore/CMakeLists.txt @@ -5,7 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(TOX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/c-toxcore/") # TODO: shared -add_library(toxcore STATIC +add_library(toxcore SHARED ${TOX_DIR}third_party/cmp/cmp.c ${TOX_DIR}third_party/cmp/cmp.h @@ -168,6 +168,8 @@ target_compile_definitions(toxcore PUBLIC USE_IPV6=1) #target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_DEBUG) target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_INFO) +set_target_properties(toxcore PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + find_package(unofficial-sodium CONFIG QUIET) find_package(sodium QUIET) if(unofficial-sodium_FOUND) # vcpkg diff --git a/external/toxcore/c-toxcore/toxcore/mono_time.c b/external/toxcore/c-toxcore/toxcore/mono_time.c index 2ce817f6..bd17d522 100644 --- a/external/toxcore/c-toxcore/toxcore/mono_time.c +++ b/external/toxcore/c-toxcore/toxcore/mono_time.c @@ -161,7 +161,7 @@ Mono_Time *mono_time_new(const Memory *mem, mono_time_current_time_cb *current_t #endif mono_time->cur_time = 0; -#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) || defined(OS_WIN32) // Maximum reproducibility. Never return time = 0. mono_time->base_time = 1; #else