summaryrefslogtreecommitdiff
path: root/AK/StringUtils.cpp
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2023-01-07 13:57:33 -0700
committerAndrew Kaster <andrewdkaster@gmail.com>2023-01-21 10:43:59 -0700
commit7ab37ee22cb85820ec73f0677f06125c466feeff (patch)
tree2c379f4e95a9b48dfb20a4d615b39d583bd96149 /AK/StringUtils.cpp
parent0420736143067c16339a08ced1ff16da36e4e163 (diff)
downloadserenity-7ab37ee22cb85820ec73f0677f06125c466feeff.zip
Everywhere: Remove string.h include from AK/Traits.h and resolve fallout
A lot of places were relying on AK/Traits.h to give it strnlen, memcmp, memcpy and other related declarations. In the quest to remove inclusion of LibC headers from Kernel files, deal with all the fallout of this included-everywhere header including less things.
Diffstat (limited to 'AK/StringUtils.cpp')
-rw-r--r--AK/StringUtils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/AK/StringUtils.cpp b/AK/StringUtils.cpp
index 5640be9109..e544d5af77 100644
--- a/AK/StringUtils.cpp
+++ b/AK/StringUtils.cpp
@@ -14,9 +14,12 @@
#include <AK/StringView.h>
#include <AK/Vector.h>
-#ifndef KERNEL
+#ifdef KERNEL
+# include <Kernel/StdLib.h>
+#else
# include <AK/DeprecatedString.h>
# include <AK/FloatingPointStringConversions.h>
+# include <string.h>
#endif
namespace AK {