summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-08-21 14:57:48 +0200
committerSam James <sam@gentoo.org>2024-08-25 16:39:43 +0100
commit17a37d4490b443f50c05ca6c35a530af4319d194 (patch)
tree20b55e0fc7b0c10baa874b9c0e77c2098add72f2
parentmedia-video/obs-studio: Fix compilation on GCC 15 (diff)
downloadgentoo-17a37d4490b443f50c05ca6c35a530af4319d194.tar.gz
gentoo-17a37d4490b443f50c05ca6c35a530af4319d194.tar.bz2
gentoo-17a37d4490b443f50c05ca6c35a530af4319d194.zip
dev-debug/apitrace: 9.0-r5 Fix compilation on GCC 15
Closes: https://bugs.gentoo.org/937722 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38271 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-debug/apitrace/apitrace-9.0-r5.ebuild1
-rw-r--r--dev-debug/apitrace/files/apitrace-9.0-include-cstdint.patch37
2 files changed, 38 insertions, 0 deletions
diff --git a/dev-debug/apitrace/apitrace-9.0-r5.ebuild b/dev-debug/apitrace/apitrace-9.0-r5.ebuild
index f15cf68d8fc9..c66387dc172f 100644
--- a/dev-debug/apitrace/apitrace-9.0-r5.ebuild
+++ b/dev-debug/apitrace/apitrace-9.0-r5.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}"/${P}-brotli-unbundle.patch
"${FILESDIR}"/${P}-libc-dlopen-glibc-2.34.patch
"${FILESDIR}"/${P}-pkgconfig-waffle.patch
+ "${FILESDIR}/${PN}-9.0-include-cstdint.patch"
)
src_prepare() {
diff --git a/dev-debug/apitrace/files/apitrace-9.0-include-cstdint.patch b/dev-debug/apitrace/files/apitrace-9.0-include-cstdint.patch
new file mode 100644
index 000000000000..45f7f2bd0f81
--- /dev/null
+++ b/dev-debug/apitrace/files/apitrace-9.0-include-cstdint.patch
@@ -0,0 +1,37 @@
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Wed, 21 Aug 2024 14:53:50 +0200
+Subject: [PATCH] apitrace: Explicitly include <cstdint>
+
+GCC 15 will no longer include it by default, resulting in build failures in projects that do not explicitly include it.
+
+Error:
+apitrace-9.0/retrace/metric_writer.cpp: In static member function ‘static void ProfilerQuery::writeMetricEntryCallback(Metric*, int, void*, int, void*)’:
+apitrace-9.0/retrace/metric_writer.cpp:50:70: error: ‘uint64_t’ does not name a type
+50 | case CNT_NUM_UINT64: std::cout << "\t" <<
+*(reinterpret_cast<uint64_t*>(data)); break;
+|
+^~~~~~~~
+apitrace-9.0/retrace/metric_writer.cpp:29:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
+ 28 | #include "metric_writer.hpp"
+ +++ |+#include <cstdint>
+ 29 |
+apitrace-9.0/retrace/metric_writer.cpp:50:78: error: expected ‘>’ before ‘*’ token
+50 | case CNT_NUM_UINT64: std::cout << "\t" <<
+*(reinterpret_cast<uint64_t*>(data)); break;
+|
+^
+
+See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
+See-also: https://bugs.gentoo.org/937722
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/retrace/metric_writer.cpp
++++ b/retrace/metric_writer.cpp
+@@ -24,6 +24,7 @@
+ **************************************************************************/
+
+ #include <iostream>
++#include <cstdint>
+
+ #include "metric_writer.hpp"
+