Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openmw: fix build on GCC 14 #370126

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions pkgs/games/openmw/0001-function-inclusion-fixes-for-gcc14.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 59f8403616e8db6dcf8f3489c44b61524044fe64 Mon Sep 17 00:00:00 2001
From: Fernando Rodrigues <alpha@sigmasquadron.net>
Date: Thu, 2 Jan 2025 04:28:42 +0000
Subject: [PATCH] Function inclusion fixes for GCC 14

This patch includes <algorithm> in bsa_file.cpp and <list> in
charactermanager.hpp to prevent a build failure with GCC 14.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
---
apps/openmw/mwstate/charactermanager.hpp | 1 +
components/bsa/bsa_file.cpp | 1 +
2 files changed, 2 insertions(+)

diff --git a/apps/openmw/mwstate/charactermanager.hpp b/apps/openmw/mwstate/charactermanager.hpp
index 8b3f2b8f8f..fac73b3d44 100644
--- a/apps/openmw/mwstate/charactermanager.hpp
+++ b/apps/openmw/mwstate/charactermanager.hpp
@@ -4,6 +4,7 @@
#include <boost/filesystem/path.hpp>

#include "character.hpp"
+#include <list>

namespace MWState
{
diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp
index 4f795ec0d4..38e97b267b 100644
--- a/components/bsa/bsa_file.cpp
+++ b/components/bsa/bsa_file.cpp
@@ -25,6 +25,7 @@

#include <components/files/constrainedfilestream.hpp>

+#include <algorithm>
#include <cassert>

#include <boost/filesystem/path.hpp>
--
2.47.0

2 changes: 2 additions & 0 deletions pkgs/games/openmw/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ stdenv.mkDerivation rec {
hash = "sha256-zkjVt3GfQZsFXl2Ht3lCuQtDMYQWxhdFO4aGSb3rsyo=";
};

patches = [ ./0001-function-inclusion-fixes-for-gcc14.patch ];

postPatch =
''
sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp # gcc12
Expand Down
Loading