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"