games-simulation/openrct2: fix build with libc++ 21

Signed-off-by: Violet Purcell <vimproved@inventati.org>
Part-of: https://github.com/gentoo/gentoo/pull/43378
Closes: https://github.com/gentoo/gentoo/pull/43378
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Violet Purcell 2025-08-07 19:35:11 -04:00 committed by Conrad Kostecki
parent c70b8cb0cc
commit 253fd39e51
No known key found for this signature in database
GPG Key ID: 7A96AB564BF498FB
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,18 @@
From https://github.com/OpenRCT2/OpenRCT2/commit/1abd50ff1ff75360c9ad77ec07be15d97d7d643a Mon Sep 17 00:00:00 2001
From: Violet Purcell <66446404+vimproved@users.noreply.github.com>
Date: Thu, 7 Aug 2025 16:03:03 -0400
Subject: [PATCH] Add explicit <cstdlib> include to Range.hpp (#24918)
LLVM libc++ 21 shuffled around some includes internally, causing cstdlib
to no longer be transitively included here. Explicitly include it for
size_t.
--- a/src/openrct2/core/Range.hpp
+++ b/src/openrct2/core/Range.hpp
@@ -10,6 +10,7 @@
#pragma once
#include <cmath>
+#include <cstdlib>
#include <type_traits>
template<typename T>

View File

@ -79,6 +79,8 @@ BDEPEND="
PATCHES=( PATCHES=(
"${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch" "${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch"
"${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch" "${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch"
# backport of https://github.com/OpenRCT2/OpenRCT2/commit/1abd50ff1ff75360c9ad77ec07be15d97d7d643a
"${FILESDIR}/${P}-libcxx-21-cstdlib.patch"
) )
src_unpack() { src_unpack() {