File sygcpp-fix-includes.patch of Package sygcpp
From 7cf33269245d3bf41068bb41be0d7f8afa23d43e Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Sun, 5 Jun 2022 23:33:05 +0100
Subject: [PATCH] Add missing includes.
Includes <array> and <cstring> are needed for std::array<> and memcpy()
respectively for correct build with GCC 12.
Previous versions of GCC were including these headers transitively
from other headers that were already included.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
src-qt/miner.h | 1 +
src/main.cpp | 1 +
src/main.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/src-qt/miner.h b/src-qt/miner.h
index d17fef6..7d3f4de 100644
--- a/src-qt/miner.h
+++ b/src-qt/miner.h
@@ -9,6 +9,7 @@
#include <QMutex>
#include <chrono>
#include <regex>
+#include <array>
#include <sodium.h>
#ifdef _WIN32
diff --git a/src/main.cpp b/src/main.cpp
index 689f4af..66e7fb8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -6,6 +6,7 @@
*
*/
+#include <cstring>
#include "main.h"
std::time_t sygstartedin = std::time(NULL); // для вывода времени работы
diff --git a/src/main.h b/src/main.h
index 18c0a6d..51d0628 100644
--- a/src/main.h
+++ b/src/main.h
@@ -6,6 +6,7 @@
#include <sstream>
#include <fstream>
#include <iomanip>
+#include <array>
#include <vector>
#include <thread>
#include <regex>
--
2.35.3