From dbfafb677dcd271743c3c29b3194a9f5e6ce45e3 Mon Sep 17 00:00:00 2001 From: Hual Date: Fri, 1 Dec 2023 13:19:17 +0200 Subject: [PATCH 1/2] Add a static openssl warning --- Server/Source/CMakeLists.txt | 3 +++ Server/Source/core_impl.hpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Server/Source/CMakeLists.txt b/Server/Source/CMakeLists.txt index 76811ebc8..f2df4b459 100644 --- a/Server/Source/CMakeLists.txt +++ b/Server/Source/CMakeLists.txt @@ -42,6 +42,9 @@ else() endif() endif() +if(UNIX AND NOT SHARED_OPENSSL) + target_compile_definitions(SERVER PRIVATE OMP_STATIC_OPENSSL) +endif() target_compile_definitions(Server PRIVATE OMP_VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR} diff --git a/Server/Source/core_impl.hpp b/Server/Source/core_impl.hpp index bc3851498..e14a8ef2b 100644 --- a/Server/Source/core_impl.hpp +++ b/Server/Source/core_impl.hpp @@ -1514,6 +1514,10 @@ class Core final : public ICore, public PlayerConnectEventHandler, public Consol printLn("Starting open.mp server (%u.%u.%u.%u) from commit %.*s", getVersion().major, getVersion().minor, getVersion().patch, getVersion().prerel, PRINT_VIEW(getVersionHash())); +#ifdef OMP_STATIC_OPENSSL + logLn(LogLevel::Warning, "Running static OpenSSL build - plugins that use OpenSSL might crash (discord-connector, pawn-requests). It's recommended to use the dynssl build."); +#endif + // Try to load components from the current directory loadComponents("components"); From 01984c64673fd4236877ca86cb568db2b69ad0a6 Mon Sep 17 00:00:00 2001 From: Hual Date: Fri, 1 Dec 2023 15:38:30 +0200 Subject: [PATCH 2/2] Fix build --- Server/Source/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Source/CMakeLists.txt b/Server/Source/CMakeLists.txt index f2df4b459..e74713bce 100644 --- a/Server/Source/CMakeLists.txt +++ b/Server/Source/CMakeLists.txt @@ -43,7 +43,7 @@ else() endif() if(UNIX AND NOT SHARED_OPENSSL) - target_compile_definitions(SERVER PRIVATE OMP_STATIC_OPENSSL) + target_compile_definitions(Server PRIVATE OMP_STATIC_OPENSSL) endif() target_compile_definitions(Server PRIVATE