From df4f37d68d7c1a35918a6c4ecc465f06e8b44e6b Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 10 Oct 2024 21:55:25 +0300 Subject: [PATCH] BAN: only define placement new operators for banan-os targets This allows building and using BAN library outside of banan-os! --- BAN/include/BAN/PlacementNew.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BAN/include/BAN/PlacementNew.h b/BAN/include/BAN/PlacementNew.h index b5fede7a..3dacc2a5 100644 --- a/BAN/include/BAN/PlacementNew.h +++ b/BAN/include/BAN/PlacementNew.h @@ -2,5 +2,9 @@ #include +#ifdef __banan_os__ inline void* operator new(size_t, void* addr) { return addr; } inline void* operator new[](size_t, void* addr) { return addr; } +#else +#include +#endif