Bläddra i källkod

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
Jesse Buhagiar 3 år sedan
förälder
incheckning
eefad5ccd7
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      Userland/Libraries/LibC/string.h

+ 5 - 0
Userland/Libraries/LibC/string.h

@@ -11,6 +11,11 @@
 
 __BEGIN_DECLS
 
+// A few C Standard Libraries include this header in <string.h>, and hence expect
+// `strcasecmp` etcetera to be available as part of a <string.h> include, so let's
+// do the same here to maintain compatibility
+#include <strings.h>
+
 size_t strlen(const char*);
 size_t strnlen(const char*, size_t maxlen);