From eefad5ccd7ff79695a4b6413d0072cabc093bed5 Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Sun, 2 Jan 2022 01:16:04 +1100 Subject: [PATCH] LibC: Include `strings.h` in `string.h` Certain C Libraries have (unfortunately) included strings.h as a part of string.h, which violates the POSIX spec for that specific header. Some applications rely on this being the case, so let's include it in our string.h --- Userland/Libraries/LibC/string.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Libraries/LibC/string.h b/Userland/Libraries/LibC/string.h index 44dabc3e36..71ffb914b2 100644 --- a/Userland/Libraries/LibC/string.h +++ b/Userland/Libraries/LibC/string.h @@ -11,6 +11,11 @@ __BEGIN_DECLS +// A few C Standard Libraries include this header in , and hence expect +// `strcasecmp` etcetera to be available as part of a include, so let's +// do the same here to maintain compatibility +#include + size_t strlen(const char*); size_t strnlen(const char*, size_t maxlen);