games-simulation/EmptyEpsilon: fix compilation with gcc 12

Closes: https://bugs.gentoo.org/846935
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Florian Schmaus 2022-05-22 19:53:56 +02:00
parent 9cdbdd263f
commit df31905a60
No known key found for this signature in database
GPG Key ID: 2239A7E8F5852052
2 changed files with 28 additions and 1 deletions

View File

@ -70,8 +70,12 @@ src_prepare() {
ln -rs "${target}" "${link}" || die
done
local serious_proton_patches=(
"${FILESDIR}/SeriousProton-cmake.patch"
"${FILESDIR}/SeriousProton-Add-missing-include-memory-to-websocket.h.patch"
)
eapply --directory="${WORKDIR}/SeriousProton-EE-${PV}" \
"${FILESDIR}/SeriousProton-cmake.patch"
"${serious_proton_patches[@]}"
}
src_configure() {

View File

@ -0,0 +1,23 @@
From 9fe127233eae44f14e37900c3f54e8a305d2f161 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Sun, 22 May 2022 12:36:08 +0200
Subject: [PATCH] Add missing #include <memory> to websocket.h
std::unique_ptr, which is used for the 'socket' field, is defined in
<memory> but currently not included. Starting with GCC 12, the missing
include will cause a compilation error.
The missing include was found by Gentoo's CI and reported as
https://bugs.gentoo.org/846935
--- a/src/io/http/websocket.h
+++ b/src/io/http/websocket.h
@@ -5,6 +5,9 @@
#include <io/network/tcpSocket.h>
#include <unordered_map>
+#ifndef EMSCRIPTEN
+#include <memory>
+#endif
namespace sp {
namespace io {