From 39d5c7f3cdc48d67c220a74ce6e2a5d4f831be80 Mon Sep 17 00:00:00 2001 From: Christopher Fore Date: Fri, 9 Aug 2024 10:11:27 -0400 Subject: [PATCH] Source/Common/Platform: Explicitly include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 15 will no longer include by default, resulting in build failures in projects that do not explicitly include it. Errors: Source/Common/Platform/NMR_EncryptionHeader.cpp: In member function ‘size_t NMR::CEncryptionHeader::readFrom(NMR::PImportStream)’: Source/Common/Platform/NMR_EncryptionHeader.cpp:35:52: error: ‘uint64_t’ was not declared in this scope 35 | if (header.Header.Length.length < (uint64_t) headerSize) | ^~~~~~~~ Source/Common/Platform/NMR_EncryptionHeader.cpp:12:1: note: ‘uint64_t’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 11 | #include +++ |+#include 12 | Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp: In member function ‘virtual const NMR::nfByte* NMR::CImportStream_Unique_Memory::getAt(NMR::nfUint64)’: Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp:128:35: error: ‘uint64_t’ was not declared in this scope 128 | if (nPosition >= (uint64_t) m_Buffer.size()) | ^~~~~~~~ Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp:37:1: note: ‘uint64_t’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 36 | #include "Common/NMR_Exception_Windows.h" +++ |+#include 37 | Test results: Test project lib3mf/build Start 1: Test_CPP_Bindings 1/1 Test 3MFConsortium#1: Test_CPP_Bindings ................ Passed 0.39 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.39 sec Gentoo bug: https://bugs.gentoo.org/937423 See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html Signed-off-by: Christopher Fore --- Source/Common/Platform/NMR_EncryptionHeader.cpp | 1 + Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Source/Common/Platform/NMR_EncryptionHeader.cpp b/Source/Common/Platform/NMR_EncryptionHeader.cpp index 7a2354ad6..d2e2d744d 100644 --- a/Source/Common/Platform/NMR_EncryptionHeader.cpp +++ b/Source/Common/Platform/NMR_EncryptionHeader.cpp @@ -8,6 +8,7 @@ #include "Common/Platform/NMR_ExportStream.h" #include "Common/NMR_Architecture_Utils.h" +#include #include #define LIB3MF_MAXENCRYPTIONHEADERSIZE (1UL << 31) diff --git a/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp b/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp index 43fd4282a..e966aa00a 100644 --- a/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp +++ b/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp @@ -35,6 +35,8 @@ This is a platform independent class for keeping data in a memory stream that ow #include "Common/NMR_Exception.h" #include "Common/NMR_Exception_Windows.h" +#include + namespace NMR { CImportStream_Unique_Memory::CImportStream_Unique_Memory()