From fe34a3ee78eeaa62e9b4831f5d27a8dbf7d7ed3f Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Thu, 8 Oct 2026 22:02:16 +0200 Subject: [PATCH] include/string.h: Also declare strcasecmp() and strncasecmp(). POSIX declares strcasecmp() and strncasecmp() in . glibc, musl and newlib also declare them in , and some programs rely on that: they include only and get an implicit declaration on NuttX. Declare the two functions in too. Only the prototypes are added: the BSD macros of (bcopy(), bzero() and others) stay out of . Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli --- include/string.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/string.h b/include/string.h index f000a87e1c7..8492d1fd393 100644 --- a/include/string.h +++ b/include/string.h @@ -74,6 +74,14 @@ size_t strlcat(FAR char *, FAR const char *, size_t); FAR char *strncat(FAR char *, FAR const char *, size_t); int strcmp(FAR const char *, FAR const char *); int strncmp(FAR const char *, FAR const char *, size_t); + +/* Also declared in . Other C libraries declare them in + * as well, and some programs rely on that. + */ + +int strcasecmp(FAR const char *, FAR const char *); +int strncasecmp(FAR const char *, FAR const char *, size_t); + int strcoll(FAR const char *, FAR const char *s2); FAR char *strcpy(FAR char *dest, FAR const char *src); FAR char *stpcpy(FAR char *dest, FAR const char *src);