From a86814f950fbdf7df98df2950e45a5d1706d0c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 Apr 2025 15:13:15 +0200 Subject: [PATCH] Fix build with GCC 15 - Fixes: rhzb#2340716 --- 160.patch | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ libarcus.spec | 10 +++-- 2 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 160.patch diff --git a/160.patch b/160.patch new file mode 100644 index 0000000..26d18e2 --- /dev/null +++ b/160.patch @@ -0,0 +1,114 @@ +From 4826f0d567a6dc373ee8d378f2e40977d94f586b Mon Sep 17 00:00:00 2001 +From: Gregor Riepl +Date: Thu, 20 Feb 2025 20:27:10 +0100 +Subject: [PATCH] Add cstdint includes where needed + +--- + include/Arcus/MessageTypeStore.h | 1 + + include/Arcus/Types.h | 1 + + src/MessageTypeStore.cpp | 1 + + src/PlatformSocket.cpp | 2 ++ + src/PlatformSocket_p.h | 1 + + src/Socket_p.h | 1 + + src/WireMessage_p.h | 2 ++ + test_package/src/test.cpp | 1 + + 8 files changed, 10 insertions(+) + +diff --git a/include/Arcus/MessageTypeStore.h b/include/Arcus/MessageTypeStore.h +index 6cc7b5ee..416c6686 100644 +--- a/include/Arcus/MessageTypeStore.h ++++ b/include/Arcus/MessageTypeStore.h +@@ -5,6 +5,7 @@ + #define ARCUS_MESSAGE_TYPE_STORE_H + + #include ++#include + + #include "Arcus/Types.h" + +diff --git a/include/Arcus/Types.h b/include/Arcus/Types.h +index 9fdcc60a..58103de6 100644 +--- a/include/Arcus/Types.h ++++ b/include/Arcus/Types.h +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + namespace google + { +diff --git a/src/MessageTypeStore.cpp b/src/MessageTypeStore.cpp +index 44c94ec7..5db03cdd 100644 +--- a/src/MessageTypeStore.cpp ++++ b/src/MessageTypeStore.cpp +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/src/PlatformSocket.cpp b/src/PlatformSocket.cpp +index ab113e32..90c590da 100644 +--- a/src/PlatformSocket.cpp ++++ b/src/PlatformSocket.cpp +@@ -1,6 +1,8 @@ + // Copyright (c) 2022 Ultimaker B.V. + // libArcus is released under the terms of the LGPLv3 or higher. + ++#include ++ + #include "PlatformSocket_p.h" + + #ifdef _WIN32 +diff --git a/src/PlatformSocket_p.h b/src/PlatformSocket_p.h +index b1e9aa59..3f7e4249 100644 +--- a/src/PlatformSocket_p.h ++++ b/src/PlatformSocket_p.h +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + namespace Arcus + { +diff --git a/src/Socket_p.h b/src/Socket_p.h +index 33f5873f..7711389c 100644 +--- a/src/Socket_p.h ++++ b/src/Socket_p.h +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #ifdef _WIN32 + #include +diff --git a/src/WireMessage_p.h b/src/WireMessage_p.h +index 07f8dd13..757aa32e 100644 +--- a/src/WireMessage_p.h ++++ b/src/WireMessage_p.h +@@ -4,6 +4,8 @@ + #ifndef ARCUS_WIRE_MESSAGE_P_H + #define ARCUS_WIRE_MESSAGE_P_H + ++#include ++ + #include "Arcus/Types.h" + + namespace Arcus +diff --git a/test_package/src/test.cpp b/test_package/src/test.cpp +index 52ca8438..09f13a59 100644 +--- a/test_package/src/test.cpp ++++ b/test_package/src/test.cpp +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + #include "test.h" + diff --git a/libarcus.spec b/libarcus.spec index 12eda09..05368db 100644 --- a/libarcus.spec +++ b/libarcus.spec @@ -17,10 +17,13 @@ Source6: ArcusConfig.cmake.in Source7: COPYING-CMAKE-SCRIPTS # https://bugzilla.redhat.com/show_bug.cgi?id=1601917 -Patch1: libArcus-3.10.0-PyQt6.sip.patch +Patch: libArcus-3.10.0-PyQt6.sip.patch # Actually export symbols -Patch2: libArcus-5.2.2-actually-export-symbols.patch +Patch: libArcus-5.2.2-actually-export-symbols.patch + +# Add missing stdint includes +Patch: https://github.com/Ultimaker/libArcus/pull/160.patch BuildRequires: protobuf-devel BuildRequires: python3-devel @@ -83,8 +86,7 @@ rm -rf CMakeLists.txt cp -a %{SOURCE4} %{SOURCE5} %{SOURCE6} . cp -a pyArcus-%{version}/src/PythonMessage.cpp python/ -%patch -P1 -p1 -%patch -P2 -p1 -b .export +%autopatch -p1 %build %cmake -DBUILD_EXAMPLES:BOOL=OFF -DCMAKE_SKIP_RPATH:BOOL=ON