From ebe6062600e8ef0f5de7a868b8564884bda1e191 Mon Sep 17 00:00:00 2001 From: wincent Date: Thu, 6 Jun 2024 09:37:49 +0200 Subject: [PATCH] Fix g++ 14 --- dCommon/dConfig.cpp | 1 + dNet/BitStreamUtils.h | 1 + thirdparty/CMakeLists.txt | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/dCommon/dConfig.cpp b/dCommon/dConfig.cpp index 56a438484..bed274b04 100644 --- a/dCommon/dConfig.cpp +++ b/dCommon/dConfig.cpp @@ -1,6 +1,7 @@ #include "dConfig.h" #include +#include #include "BinaryPathFinder.h" #include "GeneralUtils.h" diff --git a/dNet/BitStreamUtils.h b/dNet/BitStreamUtils.h index 1322ec955..33fde5642 100644 --- a/dNet/BitStreamUtils.h +++ b/dNet/BitStreamUtils.h @@ -5,6 +5,7 @@ #include "MessageIdentifiers.h" #include "BitStream.h" #include +#include enum class eConnectionType : uint16_t; diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 41135a807..e86562c81 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -23,6 +23,10 @@ if(NOT WIN32) target_include_directories(bcrypt PRIVATE "libbcrypt/include/bcrypt") endif() +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") + target_compile_definitions(bcrypt PRIVATE "_POSIX_C_SOURCE=200809L") +endif() + target_include_directories(bcrypt INTERFACE "libbcrypt/include") target_include_directories(bcrypt PRIVATE "libbcrypt/src")