aports/community/libarcus/gcc15-cstdint.patch
mio e543192e30 community/libarcus: fix build with gcc 15
Include standard int types to fix error with gcc 15.

```
In file included from /home/builder/aports/community/libarcus/src/libArcus-5.2.2/src/PlatformSocket.cpp:4:
/home/builder/aports/community/libarcus/src/libArcus-5.2.2/src/PlatformSocket_p.h:111:29: error: 'uint32_t' has not been declared
  111 |     socket_size writeUInt32(uint32_t data);
      |                             ^~~~~~~~
/home/builder/aports/community/libarcus/src/libArcus-5.2.2/src/PlatformSocket_p.h:9:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    8 | #include <string>
  +++ |+#include <cstdint>
    9 |
```
2025-09-15 19:29:33 +00:00

117 lines
2.9 KiB
Diff

Patch-Source: https://github.com/Ultimaker/libArcus/pull/160
---
From 4826f0d567a6dc373ee8d378f2e40977d94f586b Mon Sep 17 00:00:00 2001
From: Gregor Riepl <onitake@gmail.com>
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 <memory>
+#include <cstdint>
#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 <memory>
#include <string>
+#include <cstdint>
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 <iostream>
#include <sstream>
#include <unordered_map>
+#include <cstdint>
#include <google/protobuf/compiler/importer.h>
#include <google/protobuf/dynamic_message.h>
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 <cstdint>
+
#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 <memory>
#include <string>
+#include <cstdint>
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 <string>
#include <thread>
#include <unordered_map>
+#include <cstdint>
#ifdef _WIN32
#include <winsock2.h>
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 <cstdint>
+
#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 <chrono>
#include <iostream>
#include <thread>
+#include <cstdint>
#include "test.h"