mtxclient/mtxclient-gcc13-fixes.patch
2023-01-18 10:23:49 +01:00

134 lines
3.8 KiB
Diff

From 3437440a8aa5322c861cb5d5c38f887114b91763 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Wed, 18 Jan 2023 09:52:55 +0100
Subject: [PATCH] Added missing headers. Fixed build under GCC 13.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
examples/crypto_bot.cpp | 1 +
include/mtx/events/mscs/image_packs.hpp | 1 +
include/mtxclient/crypto/objects.hpp | 1 +
include/mtxclient/crypto/utils.hpp | 1 +
include/mtxclient/utils.hpp | 1 +
lib/crypto/client.cpp | 1 +
lib/crypto/encoding.cpp | 1 +
lib/crypto/utils.cpp | 1 +
lib/structs/events/encrypted.cpp | 1 +
lib/utils.cpp | 1 +
10 files changed, 10 insertions(+)
diff --git a/examples/crypto_bot.cpp b/examples/crypto_bot.cpp
index bf6ef5c81..1938330df 100644
--- a/examples/crypto_bot.cpp
+++ b/examples/crypto_bot.cpp
@@ -5,6 +5,7 @@
#include "spdlog/spdlog.h"
#include <atomic>
+#include <cstdint>
#include <fstream>
#include <iostream>
#include <nlohmann/json.hpp>
diff --git a/include/mtx/events/mscs/image_packs.hpp b/include/mtx/events/mscs/image_packs.hpp
index 165587ef2..2c875c559 100644
--- a/include/mtx/events/mscs/image_packs.hpp
+++ b/include/mtx/events/mscs/image_packs.hpp
@@ -4,6 +4,7 @@
/// @brief Image packs from [MSC2545](https://github.com/matrix-org/matrix-doc/pull/2545)
#include <bitset>
+#include <cstdint>
#include <map>
#include <string>
diff --git a/include/mtxclient/crypto/objects.hpp b/include/mtxclient/crypto/objects.hpp
index 2bb3ceca4..0ef2a4d1b 100644
--- a/include/mtxclient/crypto/objects.hpp
+++ b/include/mtxclient/crypto/objects.hpp
@@ -5,6 +5,7 @@
///
/// The wrappers implement RAII semantics, so you don't need to free stuff manually.
+#include <cstdint>
#include <memory>
#include <olm/olm.h>
#include <olm/pk.h>
diff --git a/include/mtxclient/crypto/utils.hpp b/include/mtxclient/crypto/utils.hpp
index 361ffe36f..a145f483f 100644
--- a/include/mtxclient/crypto/utils.hpp
+++ b/include/mtxclient/crypto/utils.hpp
@@ -3,6 +3,7 @@
/// @file
/// @brief Various crypto functions.
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/include/mtxclient/utils.hpp b/include/mtxclient/utils.hpp
index 7e7d4717c..1977caee2 100644
--- a/include/mtxclient/utils.hpp
+++ b/include/mtxclient/utils.hpp
@@ -3,6 +3,7 @@
/// @file
/// @brief Various utility functions for http requests.
+#include <cstdint>
#include <iosfwd>
#include <map>
#include <string>
diff --git a/lib/crypto/client.cpp b/lib/crypto/client.cpp
index 5a9bba8cc..ea36eaca3 100644
--- a/lib/crypto/client.cpp
+++ b/lib/crypto/client.cpp
@@ -1,3 +1,4 @@
+#include <cstdint>
#include <nlohmann/json.hpp>
#include <utility>
diff --git a/lib/crypto/encoding.cpp b/lib/crypto/encoding.cpp
index f6b1701c9..6f78fe7d1 100644
--- a/lib/crypto/encoding.cpp
+++ b/lib/crypto/encoding.cpp
@@ -1,6 +1,7 @@
#include <algorithm>
#include <array>
#include <cassert>
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/lib/crypto/utils.cpp b/lib/crypto/utils.cpp
index 9cf202038..444334855 100644
--- a/lib/crypto/utils.cpp
+++ b/lib/crypto/utils.cpp
@@ -12,6 +12,7 @@
#include <olm/pk.h>
#include <algorithm>
+#include <cstdint>
#include "mtx/log.hpp"
#include "mtxclient/crypto/client.hpp"
diff --git a/lib/structs/events/encrypted.cpp b/lib/structs/events/encrypted.cpp
index e8f1323b1..f365e11d1 100644
--- a/lib/structs/events/encrypted.cpp
+++ b/lib/structs/events/encrypted.cpp
@@ -1,3 +1,4 @@
+#include <cstdint>
#include <string>
#include <nlohmann/json.hpp>
diff --git a/lib/utils.cpp b/lib/utils.cpp
index 6d59227c1..9f7149e53 100644
--- a/lib/utils.cpp
+++ b/lib/utils.cpp
@@ -1,6 +1,7 @@
#include "mtxclient/utils.hpp"
#include <algorithm>
+#include <cstdint>
#include <iomanip>
#include <random>
#include <sstream>