summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-25 15:58:24 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-25 15:58:24 +0100
commit6824cb17a6820d43314fbcb655254129583af6e3 (patch)
tree9fc7b9efd0e0d9a8c7831e86e418c6a74262b337 /AK
parent00e744c2634556d39621699cc9b55b7ff8fa7c75 (diff)
downloadserenity-6824cb17a6820d43314fbcb655254129583af6e3.zip
AK: Have AK/kmalloc.h #include <new> on other platforms
This should make stuff like placement new work correctly when building outside of Serenity. This stuff is a bit delicate due to the weirdly staged toolchain build at the moment. Hopefully we can unify this stuff in the future.
Diffstat (limited to 'AK')
-rw-r--r--AK/StringImpl.cpp4
-rw-r--r--AK/kmalloc.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/AK/StringImpl.cpp b/AK/StringImpl.cpp
index f4bd10c68d..5f5d2f7752 100644
--- a/AK/StringImpl.cpp
+++ b/AK/StringImpl.cpp
@@ -29,10 +29,6 @@
#include "StdLibExtras.h"
#include "kmalloc.h"
-#ifndef __serenity__
-#include <new>
-#endif
-
//#define DEBUG_STRINGIMPL
#ifdef DEBUG_STRINGIMPL
diff --git a/AK/kmalloc.h b/AK/kmalloc.h
index 6f6375e71e..292872c2d1 100644
--- a/AK/kmalloc.h
+++ b/AK/kmalloc.h
@@ -26,6 +26,10 @@
#pragma once
+#ifndef __serenity__
+# include <new>
+#endif
+
#ifdef KERNEL
# define AK_MAKE_ETERNAL \
public: \