summaryrefslogtreecommitdiff
path: root/kernel/lib/cxxabi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lib/cxxabi.cpp')
-rw-r--r--kernel/lib/cxxabi.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/lib/cxxabi.cpp b/kernel/lib/cxxabi.cpp
index 8a96628..6d422e3 100644
--- a/kernel/lib/cxxabi.cpp
+++ b/kernel/lib/cxxabi.cpp
@@ -74,6 +74,10 @@ void operator delete[](void* ptr) noexcept { (void)ptr; /* TODO: kfree */ }
void operator delete(void* ptr, size_t) noexcept { (void)ptr; /* TODO: kfree */ }
void operator delete[](void* ptr, size_t) noexcept { (void)ptr; /* TODO: kfree */ }
-/* Placement new — doesn't allocate, just returns the pointer */
+/* Placement new — doesn't allocate, just returns the pointer.
+ * Guarded to avoid conflict with <new> header's placement new. */
+#ifndef _LIBBASTION_PLACEMENT_NEW_DEFINED
+#define _LIBBASTION_PLACEMENT_NEW_DEFINED
inline void* operator new(size_t, void* ptr) noexcept { return ptr; }
inline void* operator new[](size_t, void* ptr) noexcept { return ptr; }
+#endif