From 0d8b746ea9322b6140570a88a511b06aad818ff6 Mon Sep 17 00:00:00 2001 From: ebensza <bence.janos.szabo@ericsson.com> Date: Thu, 28 Apr 2016 10:18:15 +0200 Subject: [PATCH] correcting error when compiling with clang Signed-off-by: ebensza <bence.janos.szabo@ericsson.com> --- common/new.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/new.cc b/common/new.cc index ed12449cd..1b1c43a2d 100644 --- a/common/new.cc +++ b/common/new.cc @@ -13,17 +13,18 @@ ******************************************************************************/ #include "dbgnew.hh" #include <stddef.h> +#include <new> #undef new static void *dummy = NULL; -void *operator new(size_t size) throw () +void *operator new(size_t size) throw (std::bad_alloc) { return Malloc(size); } -void *operator new[](size_t size) throw () +void *operator new[](size_t size) throw (std::bad_alloc) { if (size == 0) return &dummy; else return Malloc(size); -- GitLab