diff --git a/CMakeLists.txt b/CMakeLists.txt index 4aaf4138956..b2a7c0f817c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.2) +cmake_minimum_required(VERSION 3.10) project(NWNX-Unified) if(NOT CMAKE_BUILD_TYPE) diff --git a/NWNXLib/External/funchook/CMakeLists.txt b/NWNXLib/External/funchook/CMakeLists.txt index 16b7c40c33c..efeef2eb99c 100644 --- a/NWNXLib/External/funchook/CMakeLists.txt +++ b/NWNXLib/External/funchook/CMakeLists.txt @@ -1,5 +1,5 @@ # GIT_SHALLOW requires cmake 3.6. -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.10) project(funchook VERSION 2.0.0 LANGUAGES C ASM) diff --git a/Plugins/Redis/cpp_redis/CMakeLists.txt b/Plugins/Redis/cpp_redis/CMakeLists.txt index 0f6d48f1ab2..895f5d5b2ae 100644 --- a/Plugins/Redis/cpp_redis/CMakeLists.txt +++ b/Plugins/Redis/cpp_redis/CMakeLists.txt @@ -23,7 +23,7 @@ ### # config ### -cmake_minimum_required(VERSION 2.8.7) +cmake_minimum_required(VERSION 3.10) set(CMAKE_MACOSX_RPATH 1) include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) diff --git a/Plugins/Redis/cpp_redis/tacopie/CMakeLists.txt b/Plugins/Redis/cpp_redis/tacopie/CMakeLists.txt index 65a4e620c52..eee045774df 100644 --- a/Plugins/Redis/cpp_redis/tacopie/CMakeLists.txt +++ b/Plugins/Redis/cpp_redis/tacopie/CMakeLists.txt @@ -23,7 +23,7 @@ ### # config ### -cmake_minimum_required(VERSION 2.8.7) +cmake_minimum_required(VERSION 3.10) set(CMAKE_MACOSX_RPATH 1) include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) diff --git a/Plugins/SQL/Targets/MySQL.cpp b/Plugins/SQL/Targets/MySQL.cpp index df0328d2232..f20ca1a2963 100644 --- a/Plugins/SQL/Targets/MySQL.cpp +++ b/Plugins/SQL/Targets/MySQL.cpp @@ -11,6 +11,19 @@ namespace SQL { MySQL::MySQL() { mysql_init(&m_mysql); + /* + SSL_CTX_set0_tmp_dh_pkey() might seg fault in WSL2 (probably also WSL1, too) environment. + + To prevent that from happening, disable SSL with: + NWNX_SQL_SSL_DISABLED=true + + NOTE: this generally should not be needed, but e.g. in my case MySQL/SSL segfaults. + */ + if (Config::Get("SSL_DISABLED", false)) + { + uint use_ssl = SSL_MODE_DISABLED; + mysql_options(&m_mysql, MYSQL_OPT_SSL_MODE, (uint const*)&use_ssl); + } m_stmt = nullptr; m_lastError = ""; m_paramCount = 0;