From e73e76e0efdccacfcda2c197b2f6ffc894123125 Mon Sep 17 00:00:00 2001 From: Ted Rodgers Date: Mon, 22 Dec 2025 23:16:12 -0500 Subject: [PATCH] Fix build with gcc 16.x src/jemalloc_cpp.cpp: In function 'void* handleOOM(std::size_t, bool)': src/jemalloc_cpp.cpp:90:22: error: '__throw_bad_alloc' is not a member of 'std'; did you mean '__throw_bad_cast'? 90 | std::__throw_bad_alloc(); https://bugs.gentoo.org/967868 Patch downloaded from https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/jemalloc/files/jemalloc-5.3.0-dont-call-libstdcxx-internals.patch?id=4b929d70d69b013ea881879d66687b461d812aec Signed-off-by: Bernd Kuhls --- src/jemalloc_cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp index fffd6aee..5a682991 100644 --- a/src/jemalloc_cpp.cpp +++ b/src/jemalloc_cpp.cpp @@ -93,7 +93,7 @@ handleOOM(std::size_t size, bool nothrow) { } if (ptr == nullptr && !nothrow) - std::__throw_bad_alloc(); + throw std::bad_alloc(); return ptr; }