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
This commit is contained in:
Jesse Buhagiar 2022-01-02 01:16:04 +11:00 committed by Brian Gianforcaro
parent 857c8850f3
commit eefad5ccd7
Notes: sideshowbarker 2024-07-17 21:44:13 +09:00

View file

@ -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);