From 4748d6ab5b149774857575845914af3e1e6c531b Mon Sep 17 00:00:00 2001 From: Christopher Fore Date: Fri, 9 Aug 2024 09:49:49 -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 #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 | 3 ++- Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Common/Platform/NMR_EncryptionHeader.cpp b/Source/Common/Platform/NMR_EncryptionHeader.cpp index 7a2354ad6..2c839acbb 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) @@ -67,4 +68,4 @@ namespace NMR { nfUint64 CEncryptionHeader::headerSize() const { return m_nfHeaderSize; } -} \ No newline at end of file +} diff --git a/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp b/Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp index 43fd4282a..d21d26c13 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() @@ -132,4 +134,4 @@ namespace NMR { return &m_Buffer[(size_t) nPosition]; } -} \ No newline at end of file +}