From b3d48a4f32ac55594f7da60514e13aa417dafe26 Mon Sep 17 00:00:00 2001 From: Manuel Frischknecht Date: Fri, 26 Jan 2024 22:57:20 +0000 Subject: [PATCH] crossfire-server: fix build due to missing `cstdint` include GCC 13 stopped including `cstdint` (and other headers) transitively in most scenarios, causing build failures in programs that relied on that behavior. This change adds a missing `cstdint` include via patch to the `crossfire-server` source, fixing such a build failure. --- .../add-cstdint-include-to-crossfire-server.patch | 13 +++++++++++++ pkgs/games/crossfire/crossfire-server.nix | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/games/crossfire/add-cstdint-include-to-crossfire-server.patch diff --git a/pkgs/games/crossfire/add-cstdint-include-to-crossfire-server.patch b/pkgs/games/crossfire/add-cstdint-include-to-crossfire-server.patch new file mode 100644 index 000000000000..73c69f533613 --- /dev/null +++ b/pkgs/games/crossfire/add-cstdint-include-to-crossfire-server.patch @@ -0,0 +1,13 @@ +diff --git a/include/Treasures.h b/include/Treasures.h +index 614078f..a00b4f6 100644 +--- a/include/Treasures.h ++++ b/include/Treasures.h +@@ -13,6 +13,8 @@ + #ifndef TREASURES_H + #define TREASURES_H + ++#include ++ + #include "AssetsCollection.h" + + extern "C" { diff --git a/pkgs/games/crossfire/crossfire-server.nix b/pkgs/games/crossfire/crossfire-server.nix index 9827aa76c526..214fdf65451b 100644 --- a/pkgs/games/crossfire/crossfire-server.nix +++ b/pkgs/games/crossfire/crossfire-server.nix @@ -27,6 +27,10 @@ stdenv.mkDerivation rec { rev = "r${rev}"; }; + patches = [ + ./add-cstdint-include-to-crossfire-server.patch + ]; + nativeBuildInputs = [ autoconf automake libtool flex perl check pkg-config python39 ]; hardeningDisable = [ "format" ];