From 22f0d04f4300019f9fc938efa2c53814368c3cc1 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 1 Jan 2023 13:32:59 +0100 Subject: [PATCH] AK: Provide a fallback definition for `std::nothrow` --- AK/kmalloc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AK/kmalloc.cpp b/AK/kmalloc.cpp index 0ce83fddab..45bf6e1c38 100644 --- a/AK/kmalloc.cpp +++ b/AK/kmalloc.cpp @@ -60,4 +60,10 @@ void operator delete[](void* ptr, size_t) noexcept return free(ptr); } +// This is usually provided by libstdc++ in most cases, and the kernel has its own definition in +// Kernel/Heap/kmalloc.cpp. If neither of those apply, the following should suffice to not fail during linking. +namespace AK_REPLACED_STD_NAMESPACE { +const nothrow_t nothrow; +} + #endif