From 939ed0ca2a7b593949973be5d09aefea1b659418 Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Sat, 23 May 2026 15:40:17 +0000 Subject: [PATCH] apps/system/microros: add rcutils strcasecmp strings.h include patch. POSIX specifies strcasecmp/strncasecmp in , not . On NuttX (and other strict POSIX environments) rcutils/src/strcasecmp.c only includes , causing an implicit-declaration error for strcasecmp when cross-compiling. Patch 0003 adds #include guarded by !_WIN32, matching the existing Windows/POSIX split in the file. Signed-off-by: Arjav Patel --- ...rcutils-strcasecmp-include-strings-h.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 system/microros/patches/0003-rcutils-strcasecmp-include-strings-h.patch diff --git a/system/microros/patches/0003-rcutils-strcasecmp-include-strings-h.patch b/system/microros/patches/0003-rcutils-strcasecmp-include-strings-h.patch new file mode 100644 index 000000000..7392f2828 --- /dev/null +++ b/system/microros/patches/0003-rcutils-strcasecmp-include-strings-h.patch @@ -0,0 +1,19 @@ +From: micro-ROS NuttX Port +Subject: [PATCH] rcutils: include for strcasecmp on NuttX + +POSIX specifies strcasecmp/strncasecmp in , not . +NuttX follows the standard strictly so omitting this header causes an +"implicit declaration" error. Guard the include with __NuttX__ so it +only applies where needed and does not affect Linux or other platforms +that already expose strcasecmp through . + +--- a/rcutils/src/strcasecmp.c ++++ b/rcutils/src/strcasecmp.c +@@ -17,6 +17,9 @@ extern "C" + #include + #include ++#ifdef __NuttX__ ++#include ++#endif + + #include "rcutils/strcasecmp.h"